buildreporter: handle app=None

This commit is contained in:
Jimmy Zelinskie 2015-02-17 15:30:09 -05:00
parent b8d9ef0fe9
commit 25fc999d50

View file

@ -57,7 +57,9 @@ class BuildMetrics(object):
"""
def __init__(self, app=None):
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')
if reporter_type == 'CloudWatch':
namespace = app.config.get('BUILD_METRICS_NAMESPACE')