From 022870b2f57ba7f8ea57ef4d7f2061c94579a78b Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Wed, 11 Oct 2017 15:36:53 +0100 Subject: [PATCH] Defeat 'dictionary changed size during iteration' error. --- plugin/typing/typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/typing/typing.py b/plugin/typing/typing.py index d4f7e22..77abda4 100644 --- a/plugin/typing/typing.py +++ b/plugin/typing/typing.py @@ -31,7 +31,7 @@ class Typing(object): def cleanup(self): now = datetime.datetime.utcnow() if now - self.cleaned_up > self.ttl: - for key in self.cache.keys(): + for key in list(self.cache.keys()): times = self.times(key, now) if not times: self.delete(key) -- 2.7.4