From a0d95a8ec49ab0b41bd39c2bb537cb1d9bc07b9d Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 24 Nov 2014 12:56:39 +0100 Subject: [PATCH] Refactoring of #952 --- lib/request/httpshandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/request/httpshandler.py b/lib/request/httpshandler.py index b20dc451a..67a2daea9 100644 --- a/lib/request/httpshandler.py +++ b/lib/request/httpshandler.py @@ -19,7 +19,7 @@ try: except ImportError: pass -_protocols = [ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv23] +_protocols = filter(None, (getattr(ssl, _, None) for _ in ("PROTOCOL_SSLv3", "PROTOCOL_TLSv1", "PROTOCOL_SSLv23", "PROTOCOL_SSLv2"))) class HTTPSConnection(httplib.HTTPSConnection): """