summaryrefslogtreecommitdiff
path: root/doc/_extensions
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2018-04-17 10:19:04 +0200
committerMartin Trigaux <mat@odoo.com>2018-04-17 13:59:50 +0200
commita87dc3111c5928d50414b38330a04d2dec0e7f43 (patch)
treec6cf6ef45cb6df4ea42e1d7ea678ad0508383ce6 /doc/_extensions
parentb8133aa64bd80c7f90402cf66f269dc9e4496851 (diff)
[IMP] doc: specify the API examples are in python2
Odoo 11 is python 3 but the xmlrpc interface works with python 2 too. The example should probably be migrated to use python 3. In the meantime specify exactly these examples are python 2 to avoid the confusion. Fixes #24232
Diffstat (limited to 'doc/_extensions')
-rw-r--r--doc/_extensions/odoo_ext/switcher.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/_extensions/odoo_ext/switcher.py b/doc/_extensions/odoo_ext/switcher.py
index 51fb604929c..8571d124259 100644
--- a/doc/_extensions/odoo_ext/switcher.py
+++ b/doc/_extensions/odoo_ext/switcher.py
@@ -1,7 +1,8 @@
from docutils import nodes, utils
from docutils.parsers.rst import Directive
-from pygments.lexers import get_lexer_by_name
+from pygments.lexers import get_lexer_by_name, PythonLexer
+PythonLexer.name = 'Python 2'
def setup(app):
app.add_directive('switcher', SwitcherDirective)