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.
This commit is contained in:
Jimmy Zelinskie 2015-02-17 13:13:12 -05:00
parent 935db5c766
commit ef8d320c95

View file

@ -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()