mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 05:11:15 -06:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user