From 45cc9528d28416155197d72653996236c8843180 Mon Sep 17 00:00:00 2001 From: Jasmine Schladen Date: Thu, 29 Oct 2020 13:48:43 -0700 Subject: [PATCH] Cleaner syntax for default region --- lemur/plugins/lemur_email/plugin.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lemur/plugins/lemur_email/plugin.py b/lemur/plugins/lemur_email/plugin.py index a9e35d16..f380c82e 100644 --- a/lemur/plugins/lemur_email/plugin.py +++ b/lemur/plugins/lemur_email/plugin.py @@ -61,9 +61,7 @@ def send_via_ses(subject, body, targets): :param targets: :return: """ - ses_region = current_app.config.get("LEMUR_SES_REGION") - if not ses_region: - ses_region = "us-east-1" + ses_region = current_app.config.get("LEMUR_SES_REGION", "us-east-1") client = boto3.client("ses", region_name=ses_region) source_arn = current_app.config.get("LEMUR_SES_SOURCE_ARN") args = {