diff --git a/buildman/jobutil/buildreporter.py b/buildman/jobutil/buildreporter.py index 08e16576b..09a74a565 100644 --- a/buildman/jobutil/buildreporter.py +++ b/buildman/jobutil/buildreporter.py @@ -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')