diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2015-04-20 14:05:27 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2015-04-20 14:05:27 +0000 |
| commit | 53c5c50374e3f428408758131cad207a4496d452 (patch) | |
| tree | d4eeb00173e847631844d5eba979491970fe9223 /docutils/utils/code_analyzer.py | |
| parent | ff201de32b108202bda0ebf3b6a444cbe44c1bae (diff) | |
| download | docutils-53c5c50374e3f428408758131cad207a4496d452.tar.gz | |
Safe import of "pygments": syntax errors with Py 3.1 and 3.2.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@7884 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/utils/code_analyzer.py')
| -rw-r--r-- | docutils/utils/code_analyzer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docutils/utils/code_analyzer.py b/docutils/utils/code_analyzer.py index 18c2c1ecf..5df203e54 100644 --- a/docutils/utils/code_analyzer.py +++ b/docutils/utils/code_analyzer.py @@ -13,7 +13,7 @@ try: from pygments.lexers import get_lexer_by_name from pygments.formatters.html import _get_ttype_class with_pygments = True -except ImportError: +except (ImportError, SyntaxError): # pygments 2.0.1 fails with Py 3.1 and 3.2 with_pygments = False # Filter the following token types from the list of class arguments: |
