ceph/teuthology/sentry.py
2013-08-21 10:27:51 -05:00

14 lines
235 B
Python

from raven import Client
client = None
def get_client(ctx):
global client
if client:
return client
dsn = ctx.teuthology_config.get('sentry_dsn')
if dsn:
client = Client(dsn=dsn)
return client