Fix tests in response to breakage in #351

This commit is contained in:
Joseph Schorr 2015-08-17 16:26:20 -04:00
parent 2fd1d5969e
commit 4625ecf273
4 changed files with 14 additions and 7 deletions

View file

@ -18,11 +18,11 @@ def start_cloudwatch_sender(metrics, app):
"""
Starts sending from metrics to a new CloudWatchSender.
"""
try:
access_key = app.config['CLOUDWATCH_AWS_ACCESS_KEY']
secret_key = app.config['CLOUDWATCH_AWS_SECRET_KEY']
namespace = app.config['CLOUDWATCH_NAMESPACE']
except KeyError:
access_key = app.config.get('CLOUDWATCH_AWS_ACCESS_KEY')
secret_key = app.config.get('CLOUDWATCH_AWS_SECRET_KEY')
namespace = app.config.get('CLOUDWATCH_NAMESPACE')
if not namespace:
logger.debug('CloudWatch not configured')
return