From de3885bda33a09080cb6b8eb898610ef634d7c13 Mon Sep 17 00:00:00 2001 From: Martin Bornhold Date: Mon, 8 Aug 2016 09:00:20 +0200 Subject: [PATCH] ae: Rely on fully prepared settings in appenlight wrapping function. --- rhodecode/lib/middleware/appenlight.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/rhodecode/lib/middleware/appenlight.py b/rhodecode/lib/middleware/appenlight.py index c078a51b..4faaadcc 100644 --- a/rhodecode/lib/middleware/appenlight.py +++ b/rhodecode/lib/middleware/appenlight.py @@ -25,7 +25,6 @@ middleware to handle appenlight publishing of errors from appenlight_client import make_appenlight_middleware from appenlight_client.exceptions import get_current_traceback from appenlight_client.wsgi import AppenlightWSGIWrapper -from paste.deploy.converters import asbool def track_exception(environ): @@ -50,7 +49,7 @@ def track_extra_information(environ, section, value): environ['appenlight.extra'][section] = value -def wrap_in_appenlight_if_enabled(app, config, appenlight_client=None): +def wrap_in_appenlight_if_enabled(app, settings, appenlight_client=None): """ Wraps the given `app` for appenlight support. @@ -64,10 +63,10 @@ def wrap_in_appenlight_if_enabled(app, config, appenlight_client=None): This is in use to support our setup of the vcs related middlewares. """ - if asbool(config['app_conf'].get('appenlight')): + if settings['appenlight']: app = RemoteTracebackTracker(app) if not appenlight_client: - app = make_appenlight_middleware(app, config) + app = make_appenlight_middleware(app, settings) appenlight_client = app.appenlight_client else: app = AppenlightWSGIWrapper(app, appenlight_client)