|
|
@ -396,6 +396,9 @@ def fetch_url(module, url, data=None, headers=None, method=None,
|
|
|
|
proxyhandler = urllib2.ProxyHandler({})
|
|
|
|
proxyhandler = urllib2.ProxyHandler({})
|
|
|
|
handlers.append(proxyhandler)
|
|
|
|
handlers.append(proxyhandler)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# pre-2.6 versions of python cannot use the custom https
|
|
|
|
|
|
|
|
# handler, since the socket class is lacking this method
|
|
|
|
|
|
|
|
if hasattr(socket, 'create_connection'):
|
|
|
|
handlers.append(CustomHTTPSHandler)
|
|
|
|
handlers.append(CustomHTTPSHandler)
|
|
|
|
|
|
|
|
|
|
|
|
opener = urllib2.build_opener(*handlers)
|
|
|
|
opener = urllib2.build_opener(*handlers)
|
|
|
|