Skip to content

Commit

Permalink
Fixes for reports sentry dsn (lint and missing import).
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Aug 25, 2017
1 parent ae48774 commit 0e467b7
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 0e467b7

Please sign in to comment.