buildreporter: handle app=None
This commit is contained in:
parent
b8d9ef0fe9
commit
25fc999d50
1 changed files with 3 additions and 1 deletions
|
@ -57,7 +57,9 @@ class BuildMetrics(object):
|
||||||
"""
|
"""
|
||||||
def __init__(self, app=None):
|
def __init__(self, app=None):
|
||||||
self._app = app
|
self._app = app
|
||||||
if app is not None:
|
if app is None:
|
||||||
|
self._reporter = None
|
||||||
|
else:
|
||||||
reporter_type = app.config.get('BUILD_METRICS_TYPE', 'Null')
|
reporter_type = app.config.get('BUILD_METRICS_TYPE', 'Null')
|
||||||
if reporter_type == 'CloudWatch':
|
if reporter_type == 'CloudWatch':
|
||||||
namespace = app.config.get('BUILD_METRICS_NAMESPACE')
|
namespace = app.config.get('BUILD_METRICS_NAMESPACE')
|
||||||
|
|
Reference in a new issue