From 25fc999d508e9c91be2ac6d16fc8472569bfa5b7 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Tue, 17 Feb 2015 15:30:09 -0500 Subject: [PATCH] buildreporter: handle app=None --- buildman/jobutil/buildreporter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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')