diff options
Diffstat (limited to 'paste/errordocument.py')
| -rw-r--r-- | paste/errordocument.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/paste/errordocument.py b/paste/errordocument.py index ca15b00..16b091c 100644 --- a/paste/errordocument.py +++ b/paste/errordocument.py @@ -14,7 +14,6 @@ from urllib import urlencode from urlparse import urlparse from paste.wsgilib import chained_app_iters from paste.recursive import ForwardRequestException, RecursiveMiddleware -from paste.deploy import converters def forward(app, codes): """ @@ -132,7 +131,13 @@ class StatusBasedForward: def __init__(self, app, mapper, global_conf=None, **params): if global_conf is None: global_conf = {} - self.debug = converters.asbool(global_conf.get('debug')) + # @@: global_conf shouldn't really come in here, only in a + # separate make_status_based_forward function + if global_conf: + from paste.deploy import converters + self.debug = converters.asbool(global_conf.get('debug', False)) + else: + self.debug = False self.application = app self.mapper = mapper self.global_conf = global_conf |
