Anonymous avatar Anonymous committed 3b99696

renamed "configDict" into "configMap" for cons

Comments (0)

Files changed (2)

 
 import cpg, thread, _cputil, _cpconfig, _cphttpserver, time
 
-def start(configFile = None, parsedConfigFile = None, configDict = {}, initOnly = 0):
+def start(configFile = None, parsedConfigFile = None, configMap = {}, initOnly = 0):
     """
         Main function. All it does is this:
             - read/parse config file if any
             - create response and request objects
-            - creates HTTP server based on configFile and configDict
+            - creates HTTP server based on configFile and configMap
             - start HTTP server
 
         Input: There are 2 ways to pass config options:
             - Let CherryPy parse a config file (configFile)
-            - Pass the options as a dictionary (configDict)
+            - Pass the options as a dictionary (configMap)
     """
 
     # cpg.configOption contains an EmptyClass instance with all the configuration option
     elif parsedConfigFile:
         _cpconfig.parseConfigFile(parsedConfigFile = parsedConfigFile)
 
-    if configDict:
-        for key, value in configDict.items():
+    if configMap:
+        for key, value in configMap.items():
             setattr(cpg.configOption, key, value)
 
     # Output config options
     # sys.path.append(r"C:\Tmp\PEAK\src")
     from wsgiref.simple_server import WSGIServer, WSGIRequestHandler
      # Read the CherryPy config file and initialize some variables
-    wsgiapp.init(configDict = {'socketPort': 8000, 'sessionStorageType': 'ram'})
+    wsgiapp.init(configMap = {'socketPort': 8000, 'sessionStorageType': 'ram'})
     server_address = ("", 8000)
     httpd = WSGIServer(server_address, WSGIRequestHandler)
     httpd.set_app(wsgiapp.wsgiApp)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.