From ef8d320c95ed93cbc3e0e8b2a311f8375e6d74a9 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Tue, 17 Feb 2015 13:13:12 -0500 Subject: [PATCH] cloudwatch: global before reading queue Technically, it isn't necessary to use the global keyword before reading a global value, only modifying it. However, in this case it leaves a pretty annoying log line. --- util/cloudwatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/cloudwatch.py b/util/cloudwatch.py index 344433806..cf7aed392 100644 --- a/util/cloudwatch.py +++ b/util/cloudwatch.py @@ -12,8 +12,8 @@ def get_queue(app): """ Returns a queue to the CloudWatchSender. If a queue/sender do not exist, creates them. """ + global queue if queue is None: - global queue access_key = app.config.get('QUEUE_METRICS_AWS_ACCESS_KEY') secret_key = app.config.get('QUEUE_METRICS_AWS_SECRET_KEY') queue = Queue()