Commit 69069cfb authored by Uwe L. Korn's avatar Uwe L. Korn Committed by Brad King
Browse files

Utilities/Sphinx: Port documentation generation to python3 (#14886)

parent e40fbbb0
......@@ -62,12 +62,12 @@ class CMakeModule(Directive):
f = io.FileInput(source_path=path, encoding=encoding,
except UnicodeEncodeError, error:
except UnicodeEncodeError as error:
raise self.severe('Problems with "%s" directive path:\n'
'Cannot encode input file path "%s" '
'(wrong locale?).' %
(, SafeString(path)))
except IOError, error:
except IOError as error:
raise self.severe('Problems with "%s" directive path:\n%s.' %
(, ErrorString(error)))
raw_lines =
......@@ -305,7 +305,7 @@ class CMakeDomain(Domain):
contnode, target)
def get_objects(self):
for refname, (docname, type) in['objects'].iteritems():
for refname, (docname, type) in['objects'].items():
yield (refname, refname, type, docname, refname, 1)
def setup(app):
......@@ -50,7 +50,7 @@ for fpath in cmake_manuals:
name, desc, [], int(sec)))
sys.stderr.write("ERROR: No cmake-manual-description in '%s'\n" % fpath)
except Exception, e:
except Exception as e:
sys.stderr.write("ERROR: %s\n" % str(e))
man_show_urls = False
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment