Skip to content

Commit

Permalink
add sentry notifications on mumble errors
Browse files Browse the repository at this point in the history
  • Loading branch information
raylu committed Apr 17, 2015
1 parent dca49b3 commit 9343855
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ debug = True

irc_host = ''

sentry_dsn = None

database = 'outlauth'
db_user = 'outlauth'

Expand Down
6 changes: 6 additions & 0 deletions mumble.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
import Ice
Ice.loadSlice('-I/usr/share/Ice/slice', ['/usr/share/slice/Murmur.ice'])
import Murmur
import raven
from sqlalchemy.orm.exc import NoResultFound

import config
import db

class Authenticator(Murmur.ServerAuthenticator):
Expand All @@ -33,6 +35,10 @@ def authenticate(self, name, pw, certificates, certhash, certstrong, current=Non
if user.flags == 1:
group_names.append('admin')
return user.id, new_name, group_names # regular login
except:
if config.sentry_dsn:
client = raven.Client(config.sentry_dsn)
client.captureException(extra={'name': name})
finally:
db.session.remove()

Expand Down

0 comments on commit 9343855

Please sign in to comment.