From 36a168c5ff50f4ad3a7f9ea79b74d0bb6bdd6593 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Thu, 10 Jan 2013 14:34:56 -0600 Subject: doc: Fallback to old behavior for intersphinx 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 --- doc/conf.py | 5 +++-- 1 file 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')) -- cgit v1.2.3-1-g7c22