Skip to content

Commit

Permalink
doc: Fallback to old behavior for intersphinx
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
solj committed Jan 10, 2013
1 parent 661dc9e commit 36a168c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(\
Expand All @@ -359,7 +360,7 @@ def check_object_path(key, url, path):
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'))

0 comments on commit 36a168c

Please sign in to comment.