Fix intersphinx for installations without urllib2.HTTPSHandler.

This commit is contained in:
Georg Brandl 2009-03-31 14:01:26 -05:00
parent 42ade899dc
commit cf1435afb5
2 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,8 @@
Release 0.6.2 (in development)
==============================
* Fix intersphinx for installations without urllib2.HTTPSHandler.
* #134: Fix pending_xref leftover nodes when using the todolist
directive from the todo extension.

View File

@ -33,10 +33,12 @@ from docutils import nodes
from sphinx.builders.html import INVENTORY_FILENAME
handlers = [urllib2.ProxyHandler(), urllib2.HTTPRedirectHandler(),
urllib2.HTTPHandler()]
if hasattr(urllib2, 'HTTPSHandler'):
handlers.append(urllib2.HTTPSHandler)
urllib2.install_opener(urllib2.build_opener(
urllib2.ProxyHandler(), urllib2.HTTPRedirectHandler(),
urllib2.HTTPHandler(), urllib2.HTTPSHandler()))
urllib2.install_opener(urllib2.build_opener(*handlers))
def fetch_inventory(app, uri, inv):