Fixes for reports sentry dsn (lint and missing import).

This commit is contained in:
Dannon Baker
2017-08-24 21:45:16 -04:00
parent ae48774f54
commit 0e467b73bc
+3 -2
View File
@@ -1,6 +1,7 @@
"""Universe configuration builder."""
import logging
import os
import re
import sys
from six.moves import configparser
@@ -68,13 +69,13 @@ class Configuration(object):
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