Skip to content

Commit

Permalink
Merge pull request #19 from dannon/reports-sentry-dsn
Browse files Browse the repository at this point in the history
Fixes for reports sentry dsn (lint and missing import).
  • Loading branch information
hexylena committed Aug 25, 2017
2 parents ae48774 + 0e467b7 commit f09b5c5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/galaxy/webapps/reports/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Universe configuration builder."""
import logging
import os
import re
import sys

from six.moves import configparser
Expand Down Expand Up @@ -68,13 +69,13 @@ def check(self):
raise ConfigurationError("Directory does not exist: %s" % path)

@property
def sentry_dsn_public( self ):
def sentry_dsn_public(self):
"""
Sentry URL with private key removed for use in client side scripts,
sentry server will need to be configured to accept events
"""
if self.sentry_dsn:
return re.sub( r"^([^:/?#]+:)?//(\w+):(\w+)", r"\1//\2", self.sentry_dsn )
return re.sub(r"^([^:/?#]+:)?//(\w+):(\w+)", r"\1//\2", self.sentry_dsn)
else:
return None

Expand Down

0 comments on commit f09b5c5

Please sign in to comment.