mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix intersphinx for installations without urllib2.HTTPSHandler.
This commit is contained in:
parent
42ade899dc
commit
cf1435afb5
2
CHANGES
2
CHANGES
@ -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.
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user