1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Merge pull request #202 from rbrito/master

Use non-lazy enumeration for removal of dictionary keys.
This commit is contained in:
William Ting 2013-04-15 09:52:23 -07:00
commit 3bbd8e8e50

View File

@ -173,7 +173,7 @@ class Database:
Deletes all entries that no longer exist on system.
"""
removed = []
for path in self.data.keys():
for path in list(self.data.keys()):
if not os.path.exists(path):
removed.append(path)
del self.data[path]