Refactored raven plugin
This commit is contained in:
parent
3fbba1af82
commit
b9c5c97238
@ -41,11 +41,12 @@ def setup_plugin():
|
|||||||
_log.info('Setting up raven from SENTRY_DSN environment variable: {0}'\
|
_log.info('Setting up raven from SENTRY_DSN environment variable: {0}'\
|
||||||
.format(os.environ.get('SENTRY_DSN')))
|
.format(os.environ.get('SENTRY_DSN')))
|
||||||
client = Client() # Implicitly looks for SENTRY_DSN
|
client = Client() # Implicitly looks for SENTRY_DSN
|
||||||
|
|
||||||
if client:
|
|
||||||
register_signal(client)
|
|
||||||
else:
|
else:
|
||||||
_log.error('Could not set up client, missing sentry DSN')
|
_log.error('Could not set up client, missing sentry DSN')
|
||||||
|
return
|
||||||
|
|
||||||
|
register_signal(client)
|
||||||
|
|
||||||
|
|
||||||
hooks = {
|
hooks = {
|
||||||
'setup': setup_plugin,
|
'setup': setup_plugin,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user