Created
July 24, 2015 15:28
-
-
Save pathcl/6b3ffce4e6f57a5f1f22 to your computer and use it in GitHub Desktop.
fixssl.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from requests.adapters import HTTPAdapter | |
from requests.packages.urllib3.poolmanager import PoolManager | |
import ssl | |
class FixSSL(HTTPAdapter): | |
def init_poolmanager(self, connections, maxsize, block=False): | |
self.poolmanager = PoolManager(num_pools=connections, | |
maxsize=maxsize, | |
block=block, | |
ssl_version=ssl.PROTOCOL_SSLv3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment