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/debug/prints.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'paste/debug') diff --git a/paste/debug/prints.py b/paste/debug/prints.py index c624669..c971895 100644 --- a/paste/debug/prints.py +++ b/paste/debug/prints.py @@ -23,7 +23,6 @@ import cgi from paste.util import threadedprint from paste import wsgilib from paste import response -from paste.deploy.converters import asbool _threadedprint_installed = False @@ -64,9 +63,14 @@ class PrintDebugMiddleware(object): def __init__(self, app, global_conf=None, force_content_type=False, print_wsgi_errors=True): + # @@: global_conf should be handled separately and only for + # the entry point self.app = app self.force_content_type = force_content_type - self.print_wsgi_errors = asbool(print_wsgi_errors) + if isinstance(print_wsgi_errors, basestring): + from paste.deploy.converters import asbool + print_wsgi_errors = asbool(print_wsgi_errors) + self.print_wsgi_errors = print_wsgi_errors def __call__(self, environ, start_response): global _threadedprint_installed -- cgit v1.2.1