diff options
author | Alex Merry <alex.merry@kde.org> | 2014-04-26 11:35:15 +0100 |
---|---|---|
committer | Alex Merry <alex.merry@kde.org> | 2014-04-26 11:36:48 +0100 |
commit | b8eef54f37f3e206d116acf5e0ab31248bd9d40b (patch) | |
tree | ef4878c1da33aa8a652df4bfd7147ab9d582907d /docs | |
parent | 12e3e7e2d6685aa29a487914cb45b27b183866ec (diff) | |
download | extra-cmake-modules-b8eef54f37f3e206d116acf5e0ab31248bd9d40b.tar.gz extra-cmake-modules-b8eef54f37f3e206d116acf5e0ab31248bd9d40b.tar.bz2 |
Fix python error in ecm sphinx module
The ecm sphinx module occasionally tried to modify a list it was
iterating over, which is a Bad Thing and raised an exception on the
third or so time it was run without clearing the build directory.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/sphinx/ecm.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/sphinx/ecm.py b/docs/sphinx/ecm.py index 76d1b550..3eb75248 100644 --- a/docs/sphinx/ecm.py +++ b/docs/sphinx/ecm.py @@ -277,9 +277,12 @@ class ECMDomain(Domain): } def clear_doc(self, docname): + to_clear = [] for fullname, (fn, _) in self.data['objects'].items(): if fn == docname: - del self.data['objects'][fullname] + to_clear.append(fullname) + for fullname in to_clear: + del self.data['objects'][fullname] def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode): |