From 37cd7d8a21010fe8d82c11f47aea9efd531d5c62 Mon Sep 17 00:00:00 2001 From: ianb Date: Sat, 19 Aug 2006 23:23:41 +0000 Subject: Removed Paste Deploy dependencies in many places --- paste/errordocument.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'paste/errordocument.py') 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 -- cgit v1.2.1