From e250a613444d5a9b7d3aa9f83ccb6ca6dc4b89d1 Mon Sep 17 00:00:00 2001 From: Hossein Shafagh Date: Thu, 28 Jan 2021 15:48:39 -0800 Subject: [PATCH] fixing the message bug --- lemur/certificates/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lemur/certificates/cli.py b/lemur/certificates/cli.py index 85b62c41..e3ce99f6 100644 --- a/lemur/certificates/cli.py +++ b/lemur/certificates/cli.py @@ -250,7 +250,6 @@ def rotate(endpoint_name, new_certificate_name, old_certificate_name, message, c else: print("[+] Rotating all endpoints that have new certificates available") - log_data["message"] = "Rotating all endpoints that have new certificates available" for endpoint in endpoint_service.get_all_pending_rotation(): log_data["endpoint"] = endpoint.dnsname if len(endpoint.certificate.replaced) == 1: @@ -284,6 +283,7 @@ def rotate(endpoint_name, new_certificate_name, old_certificate_name, message, c f"[!] Failed to rotate endpoint {endpoint.name} reason: " "Multiple replacement certificates found." ) + log_data["message"] = "Rotating endpoint from old to new cert" status = SUCCESS_METRIC_STATUS print("[+] Done!")