mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Workaround for 2to3
This commit is contained in:
parent
f8b12a45da
commit
d1d5d20f65
@ -36,8 +36,10 @@ from sphinx.builders.html import INVENTORY_FILENAME
|
||||
|
||||
handlers = [urllib2.ProxyHandler(), urllib2.HTTPRedirectHandler(),
|
||||
urllib2.HTTPHandler()]
|
||||
if hasattr(urllib2, 'HTTPSHandler'):
|
||||
try:
|
||||
handlers.append(urllib2.HTTPSHandler)
|
||||
except NameError:
|
||||
pass
|
||||
|
||||
urllib2.install_opener(urllib2.build_opener(*handlers))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user