Changeset 277
- Timestamp:
- 06/11/05 08:51:21
- Files:
-
- trunk/CHANGELOG.txt (modified) (1 diff)
- trunk/cherrypy/_cpconfig.py (modified) (2 diffs)
- trunk/cherrypy/_cphttpserver.py (modified) (4 diffs)
- trunk/cherrypy/_cphttptools.py (modified) (4 diffs)
- trunk/cherrypy/_cpserver.py (modified) (1 diff)
- trunk/cherrypy/_cputil.py (modified) (1 diff)
- trunk/cherrypy/_cpwsgi.py (modified) (2 diffs)
- trunk/cherrypy/lib/autoreload.py (modified) (1 diff)
- trunk/cherrypy/lib/filter/sessionfilter/basesession.py (modified) (1 diff)
- trunk/cherrypy/lib/filter/sessionfilter/sessionfilter.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/CHANGELOG.txt
r276 r277 1 2005-06-11: 2 * getSpecialFunction renamed getSpecialAttribute (mikerobi) 3 1 4 2005-06-10: 2 5 * New test suite (no forks, no exec). (fumanchu) trunk/cherrypy/_cpconfig.py
r275 r277 130 130 def _load(configFile = None): 131 131 """ Convert an INI file to a dictionary """ 132 _cpLogMessage = _cputil.getSpecial Function('_cpLogMessage')132 _cpLogMessage = _cputil.getSpecialAttribute('_cpLogMessage') 133 133 134 134 # Parse config file … … 156 156 157 157 def outputConfigMap(): 158 _cpLogMessage = _cputil.getSpecial Function('_cpLogMessage')158 _cpLogMessage = _cputil.getSpecialAttribute('_cpLogMessage') 159 159 _cpLogMessage("Server parameters:", 'CONFIG') 160 160 _cpLogMessage(" server.environment: %s" % get('server.environment'), 'CONFIG') trunk/cherrypy/_cphttpserver.py
r267 r277 104 104 def log_message(self, format, *args): 105 105 """ We have to override this to use our own logging mechanism """ 106 _cputil.getSpecial Function('_cpLogMessage')(format % args, "HTTP")106 _cputil.getSpecialAttribute('_cpLogMessage')(format % args, "HTTP") 107 107 108 108 … … 138 138 return 1 139 139 except (KeyboardInterrupt, SystemExit): 140 _cputil.getSpecial Function('_cpLogMessage')("<Ctrl-C> hit: shutting down http server", "HTTP")140 _cputil.getSpecialAttribute('_cpLogMessage')("<Ctrl-C> hit: shutting down http server", "HTTP") 141 141 self.shutdown() 142 142 … … 192 192 """Handle an error gracefully. May be overridden.""" 193 193 errorBody = _cphttptools.formatExc() 194 _cputil.getSpecial Function('_cpLogMessage')(errorBody)194 _cputil.getSpecialAttribute('_cpLogMessage')(errorBody) 195 195 196 196 … … 270 270 request, client_address = self.get_request() 271 271 except (KeyboardInterrupt, SystemExit): 272 _cputil.getSpecial Function('_cpLogMessage')("<Ctrl-C> hit: shutting down", "HTTP")272 _cputil.getSpecialAttribute('_cpLogMessage')("<Ctrl-C> hit: shutting down", "HTTP") 273 273 return 0 274 274 except socket.error, e: trunk/cherrypy/_cphttptools.py
r275 r277 159 159 pass 160 160 msg = "%s - %s" % (cpg.request.remoteAddr, self.requestLine[:-2]) 161 _cputil.getSpecial Function('_cpLogMessage')(msg, "HTTP")161 _cputil.getSpecialAttribute('_cpLogMessage')(msg, "HTTP") 162 162 163 163 cpg.request.base = "http://" + cpg.request.headerMap.get('Host', '') … … 228 228 # _cpOnError will probably change cpg.response.body. 229 229 # It may also change the headerMap, etc. 230 _cputil.getSpecial Function('_cpOnError')()230 _cputil.getSpecialAttribute('_cpOnError')() 231 231 232 232 finalize() … … 369 369 if methodName in ('beforeRequestBody', 'beforeMain'): 370 370 filterList = (_cpdefaults._cpDefaultInputFilterList + 371 _cputil.getSpecial Function('_cpFilterList'))371 _cputil.getSpecialAttribute('_cpFilterList')) 372 372 elif methodName in ('beforeFinalize',): 373 filterList = (_cputil.getSpecial Function('_cpFilterList') +373 filterList = (_cputil.getSpecialAttribute('_cpFilterList') + 374 374 _cpdefaults._cpDefaultOutputFilterList) 375 375 else: … … 377 377 # 'beforeErrorResponse', 'afterErrorResponse' 378 378 filterList = (_cpdefaults._cpDefaultInputFilterList + 379 _cputil.getSpecial Function('_cpFilterList') +379 _cputil.getSpecialAttribute('_cpFilterList') + 380 380 _cpdefaults._cpDefaultOutputFilterList) 381 381 for filter in filterList: trunk/cherrypy/_cpserver.py
r275 r277 128 128 cpg._httpserver = serverClass() 129 129 130 _cpLogMessage = _cputil.getSpecial Function('_cpLogMessage')130 _cpLogMessage = _cputil.getSpecialAttribute('_cpLogMessage') 131 131 132 132 servingWhat = "HTTP" trunk/cherrypy/_cputil.py
r229 r277 41 41 pass 42 42 43 def getSpecial Function(name):43 def getSpecialAttribute(name): 44 44 """ Return the special function """ 45 45 trunk/cherrypy/_cpwsgi.py
r253 r277 103 103 except: 104 104 tb = _cphttptools.formatExc() 105 _cputil.getSpecial Function('_cpLogMessage')(tb)105 _cputil.getSpecialAttribute('_cpLogMessage')(tb) 106 106 s, h, b = _cphttptools.bareError(tb) 107 107 # CherryPy test suite expects bareError body to be output, … … 231 231 self.close_connection = 1 232 232 msg = _cphttptools.formatExc(exc) 233 _cputil.getSpecial Function('_cpLogMessage')(msg, "HTTP")233 _cputil.getSpecialAttribute('_cpLogMessage')(msg, "HTTP") 234 234 self.status, self.headers, body = _cphttptools.bareError() 235 235 self.write(body) trunk/cherrypy/lib/autoreload.py
r242 r277 53 53 sys.exit(restart_with_reloader()) 54 54 except KeyboardInterrupt: 55 _cputil.getSpecial Function('_cpLogMessage')("<Ctrl-C> hit: shutting down autoreloader", "HTTP")55 _cputil.getSpecialAttribute('_cpLogMessage')("<Ctrl-C> hit: shutting down autoreloader", "HTTP") trunk/cherrypy/lib/filter/sessionfilter/basesession.py
r275 r277 94 94 95 95 if sessionKeyFunc: 96 newKey = cherrypy._cputil.getSpecial Function(sessionKeyFunc)()96 newKey = cherrypy._cputil.getSpecialAttribute(sessionKeyFunc)() 97 97 else: 98 98 s = '' trunk/cherrypy/lib/filter/sessionfilter/sessionfilter.py
r275 r277 48 48 if storageType: 49 49 try: 50 cherrypy._cputil.getSpecial Function(storageType)50 cherrypy._cputil.getSpecialAttribute(storageType) 51 51 except cherrypy.cperror.InternalError: 52 52 raise SessionBadStorageTypeError(storageType)

