diff options
author | elie <elie> | 2015-01-30 22:22:12 +0000 |
---|---|---|
committer | elie <elie> | 2015-01-30 22:22:12 +0000 |
commit | 5807582fd35cefc654ab81373f2d8bd660552464 (patch) | |
tree | 073393f76ce8ee109157435995bd5a30e91ffac4 | |
parent | 13f165d90a5650f1b2d2f7eb3c5cbc96f358b049 (diff) | |
download | pysnmp-5807582fd35cefc654ab81373f2d8bd660552464.tar.gz |
ignore expired entries in expire()
-rw-r--r-- | pysnmp/proto/cache.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pysnmp/proto/cache.py b/pysnmp/proto/cache.py index f4bb6b3..6efba88 100644 --- a/pysnmp/proto/cache.py +++ b/pysnmp/proto/cache.py @@ -27,5 +27,6 @@ class Cache: for index, cachedParams in list(self.__cacheRepository.items()): if cbFun: if cbFun(index, cachedParams, cbCtx): - del self.__cacheRepository[index] + if index in self.__cacheRepository: + del self.__cacheRepository[index] |