this is to make gholt happy; well less unhappy

This commit is contained in:
Clay Gerrard
2011-01-05 11:48:58 -06:00
parent 25bf6ebfc3
commit 9786ab6687

View File

@@ -26,10 +26,10 @@ class CatchErrorMiddleware(object):
def __init__(self, app, conf):
self.app = app
try:
# if the application already has a logger we should use that one
self.logger = app.logger
except AttributeError:
# if the application already has a logger we should use that one
self.logger = getattr(app, 'logger', None)
if not self.logger:
# and only call get_logger if we have to
self.logger = get_logger(conf)
def __call__(self, env, start_response):