From: Dan Mick Date: Sat, 1 Apr 2023 20:04:54 +0000 (-0700) Subject: tools/checkcerts.py: apparently SSLError is also possible, catch X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=81d385b2ba3d29c3c6958d2af197186f97c519c4;p=ceph-cm-ansible.git tools/checkcerts.py: apparently SSLError is also possible, catch Signed-off-by: Dan Mick --- diff --git a/tools/checkcerts.py b/tools/checkcerts.py index 901be36..e9de579 100755 --- a/tools/checkcerts.py +++ b/tools/checkcerts.py @@ -89,7 +89,7 @@ def main(): with socket.create_connection((domain, 443)) as sock: with context.wrap_socket(sock, server_hostname=domain) as ssock: cert = ssock.getpeercert() - except ssl.CertificateError as e: + except (ssl.CertificateError, ssl.SSLError) as e: print(f'{domain} cert error: {e}', file=sys.stderr) continue expire = datetime.datetime.strptime(cert['notAfter'],