dict might change, pull into list

This commit is contained in:
j 2016-02-18 12:03:14 +05:30
parent 7f0d5efccd
commit 9dda2f7303
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class Cache(dict):
def get(self, key):
now = time.time()
for key, value in self._added.items():
for key, value in list(self._added.items()):
if value < now:
del self._added[key]
del self[key]