diff options
author | Brad King <brad.king@kitware.com> | 2014-04-24 13:04:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-24 13:04:52 (GMT) |
commit | d55671ad9d6f24b79eaecbb9abbce49ef556742e (patch) | |
tree | 69380f362f190461b024866e87cb13b6a96e20c8 /Utilities | |
parent | 69069cfb1ab39d3466bedce65f02aa186f4d65fd (diff) | |
download | CMake-d55671ad9d6f24b79eaecbb9abbce49ef556742e.zip CMake-d55671ad9d6f24b79eaecbb9abbce49ef556742e.tar.gz CMake-d55671ad9d6f24b79eaecbb9abbce49ef556742e.tar.bz2 |
Utilities/Sphinx: Fix cmake domain document removal with python3
In the domain clear_doc method, avoid removing entries from a dictionary
while iterating over it. Instead accumulate a set of entries to remove
at the end.
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/Sphinx/cmake.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Utilities/Sphinx/cmake.py b/Utilities/Sphinx/cmake.py index 5eb4eac..0e8f280 100644 --- a/Utilities/Sphinx/cmake.py +++ b/Utilities/Sphinx/cmake.py @@ -290,9 +290,12 @@ class CMakeDomain(Domain): } def clear_doc(self, docname): + to_clear = set() for fullname, (fn, _) in self.data['objects'].items(): if fn == docname: - del self.data['objects'][fullname] + to_clear.add(fullname) + for fullname in to_clear: + del self.data['objects'][fullname] def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode): |