Catch also socket timeout and wrong certificate when trying SSL

issue7754
review56431002
This commit is contained in:
Cédric Krier committed 2018-10-04 09:10:19 +02:00
1 parent 19d2dd151a
commit 291fa96b53
1 file changed
+1 -1
+1 -1
View File
@@ -221,7 +221,7 @@ class Transport(xmlrpc.client.SafeTransport):
((y[0] % 2 and y[0] + 1 < len(value)) and ':' or ''),
enumerate(value), '')
return format_hash(hashlib.sha1(peercert).hexdigest())
except ssl.SSLError:
except (socket.error, ssl.SSLError, ssl.CertificateError):
if allow_http:
http_connection()
else: