From cdef40fbbe2c74a0506ce0c9bbb408ca6be37ff5 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 7 Jun 2014 19:14:31 +0200 Subject: [PATCH] Fix Cache saving crash Because was deleting values of a dict while looping over its values... --- morss/morss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/morss.py b/morss/morss.py index d2bd7b9..852cac5 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -145,7 +145,7 @@ class Cache: if not os.path.exists(self._dir): os.makedirs(self._dir) - for i in self._cache: + for i in self._cache.keys(): if time.time() - self._cache[i]['last'] > self._lifespan > -1: del self._cache[i]