From 1b2cbd5b88ad75f2f9689bf5ef38e69835146b69 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 26 Sep 2018 16:19:01 +0200 Subject: [PATCH] [FIX] _extension: build with sphinx 1.8 cherry-pick of odoo/odoo@ac37ca39eaf429 but dropping the compatibility of sphinx 1.2 to simplify --- _extensions/github_link.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_extensions/github_link.py b/_extensions/github_link.py index e30ae3e5b..537280c00 100644 --- a/_extensions/github_link.py +++ b/_extensions/github_link.py @@ -99,7 +99,7 @@ def add_doc_link(app, pagename, templatename, context, doctree): # in Sphinx 1.3 it's possible to have mutliple source suffixes and that # may be useful in the future source_suffix = app.config.source_suffix - source_suffix = source_suffix if isinstance(source_suffix, str) else source_suffix[0] + source_suffix = next(iter(source_suffix)) # FIXME: odoo/odoo has a doc/ prefix which is incorrect for this # project, how to unify? Add new setting? context['github_link'] = lambda mode='edit': make_github_link(