From 0e467b73bcb1c6493bda6997bb133c19b72a275d Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Thu, 24 Aug 2017 21:45:16 -0400 Subject: [PATCH] Fixes for reports sentry dsn (lint and missing import). --- lib/galaxy/webapps/reports/config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/webapps/reports/config.py b/lib/galaxy/webapps/reports/config.py index b520905a9caf..b69c3f2640f1 100644 --- a/lib/galaxy/webapps/reports/config.py +++ b/lib/galaxy/webapps/reports/config.py @@ -1,6 +1,7 @@ """Universe configuration builder.""" import logging import os +import re import sys from six.moves import configparser @@ -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