main: Catch the CertificateError exception when doing the ssl handshake.
This commit is contained in:
parent
0a8e491b00
commit
8f1c79e640
1 changed files with 1 additions and 1 deletions
2
main.py
2
main.py
|
@ -223,7 +223,7 @@ def try_ssl_handshake(server):
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
except (ssl.SSLError, socket.error) as error:
|
except (ssl.SSLError, ssl.CertificateError, socket.error) as error:
|
||||||
try:
|
try:
|
||||||
str_error = error.reason if error.reason else "Unknown error"
|
str_error = error.reason if error.reason else "Unknown error"
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|
Loading…
Reference in a new issue