diff options
author | Brad King <brad.king@kitware.com> | 2013-12-23 15:21:05 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-12-23 15:21:05 (GMT) |
commit | e73d1ad003c50730a8141db757462574c0c2dddc (patch) | |
tree | 7bb1b8cb1dc1931074f197d1800f295b38a949db | |
parent | c23332c3c050dbfd4fd0eebef78ee783f427b232 (diff) | |
parent | fb107d84d2c79cc985b6bc72113db3ddac1a6584 (diff) | |
download | CMake-e73d1ad003c50730a8141db757462574c0c2dddc.zip CMake-e73d1ad003c50730a8141db757462574c0c2dddc.tar.gz CMake-e73d1ad003c50730a8141db757462574c0c2dddc.tar.bz2 |
Merge topic 'MakeDocsWorkWithDocutilsBefore0_11'
fb107d8 Help: Fix Sphinx extension with docutils < 0.11
-rw-r--r-- | Utilities/Sphinx/cmake.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Utilities/Sphinx/cmake.py b/Utilities/Sphinx/cmake.py index 146e1f6..1955e42 100644 --- a/Utilities/Sphinx/cmake.py +++ b/Utilities/Sphinx/cmake.py @@ -14,7 +14,12 @@ import re from docutils.parsers.rst import Directive, directives from docutils.transforms import Transform -from docutils.utils.error_reporting import SafeString, ErrorString +try: + from docutils.utils.error_reporting import SafeString, ErrorString +except ImportError: + # error_reporting was not in utils before version 0.11: + from docutils.error_reporting import SafeString, ErrorString + from docutils import io, nodes from sphinx.directives import ObjectDescription |