From b9c5c97238e59791828d1689ac4f942861883eba Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Fri, 22 Feb 2013 23:44:17 +0100 Subject: [PATCH] Refactored raven plugin --- mediagoblin/plugins/raven/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mediagoblin/plugins/raven/__init__.py b/mediagoblin/plugins/raven/__init__.py index d6308d3b..624a615e 100644 --- a/mediagoblin/plugins/raven/__init__.py +++ b/mediagoblin/plugins/raven/__init__.py @@ -41,11 +41,12 @@ def setup_plugin(): _log.info('Setting up raven from SENTRY_DSN environment variable: {0}'\ .format(os.environ.get('SENTRY_DSN'))) client = Client() # Implicitly looks for SENTRY_DSN - - if client: - register_signal(client) else: _log.error('Could not set up client, missing sentry DSN') + return + + register_signal(client) + hooks = { 'setup': setup_plugin, -- 2.25.1