[FIX] core: correct LRU cleaning

Do not change dictionary size since during iteration
This commit is contained in:
Christophe Simonis 2015-04-03 16:33:18 +02:00
parent 14fd77c132
commit 3171fd472e
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ class LRU(object):
def clear_prefix(self, prefix):
""" Remove from `self` all the items with the given `prefix`. """
n = len(prefix)
for key in self.iterkeys():
for key in self.keys():
if key[:n] == prefix:
del self[key]