From 45dcc78fe2144269cc2aec2f63da3c4ca5d6a9aa Mon Sep 17 00:00:00 2001 From: Sam Sneed <163201376+sam-sneed@users.noreply.github.com> Date: Wed, 24 Jul 2024 18:29:31 -0500 Subject: [PATCH] Fix TLS bug --- main.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 734f749..a065ddf 100644 --- a/main.py +++ b/main.py @@ -238,12 +238,11 @@ def monitor_registry_changes(): # Verify TLS Certificates def verify_tls_cert(url): - while True: - try: - response = requests.get(url, verify=certifi.where()) - print(f"TLS certificate valid for {url}") - except requests.exceptions.SSLError as e: - print(f"TLS certificate error for {url}: {e}") + try: + response = requests.get(url, verify=certifi.where()) + print(f"TLS certificate valid for {url}") + except requests.exceptions.SSLError as e: + print(f"TLS certificate error for {url}: {e}") def monitor_tls_certificates(): urls = monitored_urls