diff --git a/src/Lru.py b/src/Lru.py index 212956e7a..4928cbc1f 100644 --- a/src/Lru.py +++ b/src/Lru.py @@ -75,7 +75,8 @@ class LRU(object): lnk.next.prev = None self.first = lnk.next lnk.next = None - del self.data[lnk.value[0]] + if lnk.value[0] in self.data: + del self.data[lnk.value[0]] del lnk def __delitem__(self, obj):