From 8d7fb9b791276d7d638a88d472122e25d7e89e74 Mon Sep 17 00:00:00 2001 From: Nitzo Date: Tue, 21 Jun 2016 20:30:21 +0300 Subject: [YoutubeCom] fix #2515 --- module/plugins/hoster/YoutubeCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/YoutubeCom.py b/module/plugins/hoster/YoutubeCom.py index 5706512b9..b48af028e 100644 --- a/module/plugins/hoster/YoutubeCom.py +++ b/module/plugins/hoster/YoutubeCom.py @@ -40,7 +40,7 @@ class BIGHTTPRequest(HTTPRequest): class YoutubeCom(Hoster): __name__ = "YoutubeCom" __type__ = "hoster" - __version__ = "0.52" + __version__ = "0.53" __status__ = "testing" __pattern__ = r'https?://(?:[^/]*\.)?(youtu\.be/|youtube\.com/watch\?(?:.*&)?v=)\w+' @@ -140,9 +140,9 @@ class YoutubeCom(Hoster): self.fail(e.message) #: Remove old records from cache - for _c in cache_info['cache'].iterkeys(): - if time.time() >= cache_info['cache'][_c]['time'] + 24 * 60 * 60: - cache_info['cache'].pop(_c, None) + for _k in list(cache_info['cache'].iterkeys()): + if time.time() >= cache_info['cache'][_k]['time'] + 24 * 60 * 60: + cache_info['cache'].pop(_k, None) cache_dirty = True if cache_dirty: -- cgit v1.2.3