Refactored raven plugin
authorJoar Wandborg <joar@wandborg.se>
Fri, 22 Feb 2013 22:44:17 +0000 (23:44 +0100)
committerJoar Wandborg <joar@wandborg.se>
Sat, 2 Mar 2013 23:46:05 +0000 (00:46 +0100)
mediagoblin/plugins/raven/__init__.py

index d6308d3b64dcd2424f8c6c64187fc1cbc6c67dd2..624a615e5c1f345827cc1a640f3719e648968aec 100644 (file)
@@ -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,