Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
Fix a bug in unindexing removed messages (it was iterating over a lazy
Browse files Browse the repository at this point in the history
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.]
  • Loading branch information
gvanrossum committed Dec 3, 2002
1 parent 65d36de commit 76e58a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/mhindex.py
Expand Up @@ -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:
Expand Down

0 comments on commit 76e58a2

Please sign in to comment.