From fb107d84d2c79cc985b6bc72113db3ddac1a6584 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Sun, 22 Dec 2013 20:46:57 +0100 Subject: Help: Fix Sphinx extension with docutils < 0.11 In older versions of python docutils "error_reporting" was not in the "utils" subpackage, so try the older location if the new one failed. Alex --- Utilities/Sphinx/cmake.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- cgit v0.12