From b8eef54f37f3e206d116acf5e0ab31248bd9d40b Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Sat, 26 Apr 2014 11:35:15 +0100 Subject: 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. --- docs/sphinx/ecm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'docs/sphinx') 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): -- cgit v1.2.1