1.1 --- a/WebStack/Adapters/ModPython.py Fri Jun 20 22:27:50 2008 +0200
1.2 +++ b/WebStack/Adapters/ModPython.py Sat Jan 29 23:34:57 2005 +0000
1.3 @@ -8,12 +8,12 @@
1.4 from WebStack.Generic import EndOfResponse
1.5 from mod_python import apache
1.6
1.7 -def respond(request, resource, debug=0):
1.8 +def respond(request, resource, handle_errors=1):
1.9
1.10 """
1.11 Dispatch the given 'request' to the root application-specific 'resource'.
1.12 - The optional 'debug' flag, if set to 1, causes tracebacks to be displayed in
1.13 - the browser.
1.14 + The optional 'handle_errors' flag, if set to false, causes tracebacks to be
1.15 + displayed in the browser.
1.16 """
1.17
1.18 trans = WebStack.ModPython.Transaction(request)
1.19 @@ -32,17 +32,17 @@
1.20 # NOTE: Error conditions should be investigated further, along with
1.21 # NOTE: other response states.
1.22
1.23 - if not debug:
1.24 + if handle_errors:
1.25 return apache.HTTP_INTERNAL_SERVER_ERROR
1.26 else:
1.27 raise
1.28
1.29 -def authenticate(request, authenticator, debug=0):
1.30 +def authenticate(request, authenticator, handle_errors=1):
1.31
1.32 """
1.33 Dispatch the given 'request' to the application-specific 'authenticator'.
1.34 - The optional 'debug' flag, if set to 1, causes tracebacks to be displayed in
1.35 - the browser.
1.36 + The optional 'handle_errors' flag, if set to false, causes tracebacks to be
1.37 + displayed in the browser.
1.38 """
1.39
1.40 trans = WebStack.ModPython.Transaction(request)
1.41 @@ -60,7 +60,7 @@
1.42 # NOTE: Error conditions should be investigated further, along with
1.43 # NOTE: other response states.
1.44
1.45 - if not debug:
1.46 + if handle_errors:
1.47 return apache.HTTP_INTERNAL_SERVER_ERROR
1.48 else:
1.49 raise