Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a0d95a8

Browse files
committed
Refactoring of #952
1 parent 27cd9e7 commit a0d95a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/request/httpshandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
except ImportError:
2020
pass
2121

22-
_protocols = [ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv23]
22+
_protocols = filter(None, (getattr(ssl, _, None) for _ in ("PROTOCOL_SSLv3", "PROTOCOL_TLSv1", "PROTOCOL_SSLv23", "PROTOCOL_SSLv2")))
2323

2424
class HTTPSConnection(httplib.HTTPSConnection):
2525
"""

0 commit comments

Comments
 (0)