Robert Brewer avatar Robert Brewer committed e4e4ad5

Now with proper newlines!

Comments (0)

Files changed (5)

cherrypy/_cpconfig.py

 cpg = None # delayed import
 
 defaultGlobal = {
-    'server.socketPort': 8080,
-    'server.socketHost': '',
-    'server.socketFile': '',
-    'server.socketQueueSize': 5,
-
-    'server.environment': 'development',
-    'server.protocolVersion': 'HTTP/1.0',
-    'server.logToScreen': True,
-    'server.logFile': '',
-    'server.reverseDNS': False,
-    'server.threadPool': 0,
-
-    'session.storageType': 'ram',
-    'session.timeout': 60,
-    'session.cleanUpDelay': 60,
-    'session.cookieName': 'CherryPySession',
-    'session.storageFileDir': '',
+    'server.socketPort': 8080,
+    'server.socketHost': '',
+    'server.socketFile': '',
+    'server.socketQueueSize': 5,
+
+    'server.environment': 'development',
+    'server.protocolVersion': 'HTTP/1.0',
+    'server.logToScreen': True,
+    'server.logFile': '',
+    'server.reverseDNS': False,
+    'server.threadPool': 0,
+
+    'session.storageType': 'ram',
+    'session.timeout': 60,
+    'session.cleanUpDelay': 60,
+    'session.cookieName': 'CherryPySession',
+    'session.storageFileDir': '',
     }
-configMap = {"/": defaultGlobal.copy()}
+configMap = {"/": defaultGlobal.copy()}
 
 def update(updateMap=None, file=None):
     if updateMap:

cherrypy/_cphttptools.py

     path = urllib.unquote(path)
     
     try:
-        func, objectPathList, virtualPathList = mapPathToObject()
+        func, objectPathList, virtualPathList = mapPathToObject()
         
-        # Remove "root" from objectPathList and join it to get objectPath
-        cpg.request.objectPath = '/' + '/'.join(objectPathList[1:])
-        body = func(*(virtualPathList + cpg.request.paramList),
-                    **(cpg.request.paramMap))
+        # Remove "root" from objectPathList and join it to get objectPath
+        cpg.request.objectPath = '/' + '/'.join(objectPathList[1:])
+        body = func(*(virtualPathList + cpg.request.paramList),
+                    **(cpg.request.paramMap))
         cpg.response.body = iterable(body)
     except cperror.IndexRedirect, inst:
         # For an IndexRedirect, we don't go through the regular

cherrypy/cperror.py

 class RequestHandled(Exception):
     """Exception raised when no further request handling should occur."""
     pass
-
+
 class IndexRedirect(Exception):
-    """Exception raised when the request should be redirected.
-    
-    The new URL must be passed as the first argument to the Exception, e.g.,
-        cperror.IndexRedirect(newUrl)
+    """Exception raised when the request should be redirected.
+    
+    The new URL must be passed as the first argument to the Exception, e.g.,
+        cperror.IndexRedirect(newUrl)
     """
     pass
 

cherrypy/test/test.py

         for testmod in testList:
             # Must run each module in a separate suite,
             # because each module uses/overwrites cpg globals.
-            cpg.config.configMap.clear()
+            cpg.config.configMap.clear()
             cpg.config.configMap["/"] = cpg.config.defaultGlobal.copy()
             cpg.config.update({'/': server_conf.copy()})
             suite = CPTestLoader.loadTestsFromName(testmod)

cherrypy/test/test_tutorials.py

 
 import unittest
 import sys
-from cherrypy import cpg
+from cherrypy import cpg
 from cherrypy.test import helper
-
-server_conf = {'server.socketHost': helper.HOST,
-               'server.socketPort': helper.PORT,
-               'server.threadPool': 10,
-               'server.logToScreen': False,
-               'server.environment': "production",
-##               'profiling.on': True,
-               }
+
+server_conf = {'server.socketHost': helper.HOST,
+               'server.socketPort': helper.PORT,
+               'server.threadPool': 10,
+               'server.logToScreen': False,
+               'server.environment': "production",
+##               'profiling.on': True,
+               }
 
 def load_tut_module(tutorialName):
     """Import or reload tutorial module as needed."""
-    cpg.config.configMap.clear()
-    cpg.config.configMap["/"] = cpg.config.defaultGlobal.copy()
-    cpg.config.update({'/': server_conf.copy()})
-    
+    cpg.config.configMap.clear()
+    cpg.config.configMap["/"] = cpg.config.defaultGlobal.copy()
+    cpg.config.update({'/': server_conf.copy()})
+    
     target = "cherrypy.tutorial." + tutorialName
     if target in sys.modules:
         module = reload(sys.modules[target])
     else:
-        module = __import__(target)
+        module = __import__(target)
     
-    cpg.server.start(initOnly=True)
+    cpg.server.start(initOnly=True)
 
 
 class TutorialTest(unittest.TestCase):
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.