From 8f1c79e640a3be290a0b588630bd4cbdc9470224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 15 Oct 2018 22:14:43 +0200 Subject: [PATCH] main: Catch the CertificateError exception when doing the ssl handshake. --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index b3ad24a..658d526 100644 --- a/main.py +++ b/main.py @@ -223,7 +223,7 @@ def try_ssl_handshake(server): return False - except (ssl.SSLError, socket.error) as error: + except (ssl.SSLError, ssl.CertificateError, socket.error) as error: try: str_error = error.reason if error.reason else "Unknown error" except AttributeError: