diff options
author | Ian Bicking <ian@ianbicking.org> | 2007-08-14 21:53:07 +0000 |
---|---|---|
committer | Ian Bicking <ian@ianbicking.org> | 2007-08-14 21:53:07 +0000 |
commit | a1c0daaef6c0eb15c77a56d49d99295b15e8c63b (patch) | |
tree | 4d5bd7e9c9313bdd63ac3b5cceb771e83069f3c2 | |
parent | 71080830b2799bfd8e78c77c4a6375f6b6cbbd3a (diff) | |
download | paste-git-a1c0daaef6c0eb15c77a56d49d99295b15e8c63b.tar.gz |
inherit show_exceptions_in_wsgi_errors from global_conf
-rw-r--r-- | docs/news.txt | 3 | ||||
-rw-r--r-- | paste/exceptions/errormiddleware.py | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/docs/news.txt b/docs/news.txt index 76eed30..7addad7 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -21,6 +21,9 @@ svn trunk attribute (that does not include parameters), and a ``.charset`` attribute (that gets the charset parameter). +* Inherit inherit show_exceptions_in_wsgi_errors from global + configuration. Inherit ``debug`` more properly. + 1.4 --- diff --git a/paste/exceptions/errormiddleware.py b/paste/exceptions/errormiddleware.py index 0436c28..629963a 100644 --- a/paste/exceptions/errormiddleware.py +++ b/paste/exceptions/errormiddleware.py @@ -82,7 +82,7 @@ class ErrorMiddleware(object): debug=NoDefault, error_email=None, error_log=None, - show_exceptions_in_wsgi_errors=False, + show_exceptions_in_wsgi_errors=NoDefault, from_address=None, smtp_server=None, error_subject_prefix=None, @@ -94,7 +94,9 @@ class ErrorMiddleware(object): if global_conf is None: global_conf = {} if debug is NoDefault: - debug = global_conf.get('debug') + debug = converters.asbool(global_conf.get('debug')) + if show_exceptions_in_wsgi_errors is NoDefault: + show_exceptions_in_wsgi_errors = converters.asbool(global_conf.get('show_exceptions_in_wsgi_errors')) from paste.util import converters self.debug_mode = converters.asbool(debug) if error_email is None: |