From 33e46d4a5349fe67fb2ac25e76af231cdd18681c Mon Sep 17 00:00:00 2001 From: Jasmine Schladen Date: Tue, 15 Dec 2020 13:37:24 -0800 Subject: [PATCH] Fix return type --- lemur/notifications/cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lemur/notifications/cli.py b/lemur/notifications/cli.py index 0a76bad5..042a54fb 100644 --- a/lemur/notifications/cli.py +++ b/lemur/notifications/cli.py @@ -85,10 +85,12 @@ def security_expiration_summary(exclude): status = FAILURE_METRIC_STATUS try: print("Starting to notify security team about expiring certificates!") - status = send_security_expiration_summary(exclude) + success = send_security_expiration_summary(exclude) print( - "Finished notifying security team about expiring certificates!" + f"Finished notifying security team about expiring certificates! Success: {success}" ) + if success: + status = SUCCESS_METRIC_STATUS except Exception: sentry.captureException()