1. Doug Hellmann
  2. sphinx

Commits

DasIch  committed 9be2b52

Workaround for 2to3

  • Participants
  • Parent commits 0a17f87
  • Branches default

Comments (0)

Files changed (1)

File sphinx/ext/intersphinx.py

View file
 
 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))