From 76e58a2b05db35e051e3b6cefa4d3c63ad0dc509 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 3 Dec 2002 21:30:28 +0000 Subject: [PATCH] Fix a bug in unindexing removed messages (it was iterating over a lazy list that was being modified as we went). [Backport from Zope3; I'm not actually sure if the list returned by **Btree.keys() is lazy, but I assume it is.] --- tests/mhindex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mhindex.py b/tests/mhindex.py index 4be25ee..a21be7a 100644 --- a/tests/mhindex.py +++ b/tests/mhindex.py @@ -468,7 +468,7 @@ def updatefolder(self, f, msgs): self.index.index_text(docid, text) self.maycommit() # Remove messages from the folder that no longer exist - for path in self.path2docid.keys(f.name): + for path in list(self.path2docid.keys(f.name)): if not path.startswith(f.name + "/"): break if self.getmtime(path) == 0: