Changeset 1885
- Timestamp:
- 02/04/08 20:49:49
- Files:
-
- trunk/cherrypy/lib/cptools.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/lib/cptools.py
r1811 r1885 1 1 """Functions for builtin CherryPy tools.""" 2 2 3 import logging 3 4 import md5 4 5 import re … … 165 166 def referer(pattern, accept=True, accept_missing=False, error=403, 166 167 message='Forbidden Referer header.'): 167 """Raise HTTPError if Referer header does not pass our test.168 """Raise HTTPError if Referer header does/does not match the given pattern. 168 169 169 170 pattern: a regular expression pattern to test against the Referer. … … 287 288 288 289 289 def log_traceback( ):290 def log_traceback(severity=logging.DEBUG): 290 291 """Write the last error's traceback to the cherrypy error log.""" 291 292 from cherrypy import _cperror 292 cherrypy.log(_cperror.format_exc(), "HTTP" )293 cherrypy.log(_cperror.format_exc(), "HTTP", severity=severity) 293 294 294 295 def log_request_headers():

