From 6ab60256fa6bc8450fe83e758df8f32f17d42df0 Mon Sep 17 00:00:00 2001 From: Martyn Gigg <martyn.gigg@gmail.com> Date: Wed, 22 Apr 2015 16:38:06 +0100 Subject: [PATCH] Fix runsphinx.py for vanilla Python --- Code/Mantid/docs/runsphinx.py.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Code/Mantid/docs/runsphinx.py.in b/Code/Mantid/docs/runsphinx.py.in index ced46db8d7e..c82b6edd966 100644 --- a/Code/Mantid/docs/runsphinx.py.in +++ b/Code/Mantid/docs/runsphinx.py.in @@ -76,8 +76,12 @@ def main(sysarg): # causes Sphinx to fall over. We need to put it back while processing # the documentation from pygments.lexer import RegexLexer - # Reverse monkeypatch using unpatched function stored in mantid_ipython_widget! - RegexLexer.get_tokens_unprocessed = RegexLexer.get_tokens_unprocessed_unpatched + # Reverse monkeypatch using unpatched function stored in mantid_ipython_widget + # if it is available + try: + RegexLexer.get_tokens_unprocessed = RegexLexer.get_tokens_unprocessed_unpatched + except AttributeError: + pass try: return_value = sphinx.main(argv) finally: -- GitLab