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