diff options
author | pjenvey <devnull@localhost> | 2006-07-26 20:55:11 +0000 |
---|---|---|
committer | pjenvey <devnull@localhost> | 2006-07-26 20:55:11 +0000 |
commit | 9914f34bd97f8fe0cf6529d1cd6f659671e8d59f (patch) | |
tree | 1e517d688145904f86aa5c6df27db11a30576dee /paste/errordocument.py | |
parent | 7db74fa8fdb0a48a673b3488e5d1fe8cc73bcc13 (diff) | |
download | paste-9914f34bd97f8fe0cf6529d1cd6f659671e8d59f.tar.gz |
cleaner gathering of the debug config setting via converters.asbool
Diffstat (limited to 'paste/errordocument.py')
-rw-r--r-- | paste/errordocument.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/paste/errordocument.py b/paste/errordocument.py index 3a7c670..e004182 100644 --- a/paste/errordocument.py +++ b/paste/errordocument.py @@ -14,6 +14,7 @@ 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): """ @@ -131,10 +132,7 @@ class StatusBasedForward: def __init__(self, app, mapper, global_conf=None, **params): if global_conf is None: global_conf = {} - if global_conf.has_key('debug') and global_conf['debug'].lower() == 'true': - self.debug = True - else: - self.debug = False + self.debug = converters.asbool(global_conf.get('debug')) self.application = app self.mapper = mapper self.global_conf = global_conf |