diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-08-24 13:17:53 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-08-24 13:17:53 +0200 |
| commit | 017ee5eab376b4f09beb62812c1cbc682009ed86 (patch) | |
| tree | 2af185b0604cd8ce9129c39137bbf39d21d7be89 /doc/_extensions/github_link.py | |
| parent | 006c16198f7f68c9dc8b895defd013f33008840a (diff) | |
| parent | 877e7098719195ed2934fc9c3b5c3bd8ad8bab07 (diff) | |
[MERGE] forward port branch saas-17 up to 877e7098719
Diffstat (limited to 'doc/_extensions/github_link.py')
| -rw-r--r-- | doc/_extensions/github_link.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/_extensions/github_link.py b/doc/_extensions/github_link.py index d3e5d61c28e..155e4083025 100644 --- a/doc/_extensions/github_link.py +++ b/doc/_extensions/github_link.py @@ -4,6 +4,8 @@ import os.path from werkzeug import urls +from odoo.tools import pycompat + """ * adds github_link(mode) context variable: provides URL (in relevant mode) of current document on github @@ -99,7 +101,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, basestring) else source_suffix[0] + source_suffix = source_suffix if isinstance(source_suffix, pycompat.string_types) else source_suffix[0] # can't use functools.partial because 3rd positional is line not mode context['github_link'] = lambda mode='edit': make_github_link( app, 'doc/%s%s' % (pagename, source_suffix), mode=mode) |
