summaryrefslogtreecommitdiffstats
path: root/doc/conf.py
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2013-01-10 14:34:56 -0600
committerSol Jerome <sol.jerome@gmail.com>2013-01-10 14:34:56 -0600
commit36a168c5ff50f4ad3a7f9ea79b74d0bb6bdd6593 (patch)
tree981566aeaa4eec12c0e44d3272b4028cb809748f /doc/conf.py
parent661dc9ed5378a2041b7d5f8304fde2cfad7da585 (diff)
downloadbcfg2-36a168c5ff50f4ad3a7f9ea79b74d0bb6bdd6593.tar.gz
bcfg2-36a168c5ff50f4ad3a7f9ea79b74d0bb6bdd6593.tar.bz2
bcfg2-36a168c5ff50f4ad3a7f9ea79b74d0bb6bdd6593.zip
doc: Fallback to old behavior for intersphinxv1.3.0rc1
If the object inventories don't exist on disk, fallback to the previous method of attempting to download them from the specified URL. Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'doc/conf.py')
-rw-r--r--doc/conf.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 5073b7225..a1bceb1b1 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -337,7 +337,8 @@ def setup(app):
def check_object_path(key, url, path):
if os.path.isfile(path):
return {key: (url, path)}
- return {}
+ else:
+ return {key: (url, None)}
intersphinx_mapping = {}
intersphinx_mapping.update(\
@@ -359,7 +360,7 @@ for pyver in versions:
key = 'py' + pyver.replace(".", "")
intersphinx_mapping.update(\
check_object_path(key,
- 'http://docs.python.org/',
+ 'http://docs.python.org/%s' % pyver,
'/usr/share/doc/python'
+ '.'.join([str(x) for x in sys.version_info[0:2]])
+ '/html/objects.inv'))