From 4ec4fa208e50d0f384ce2bec65c8612cb5029996 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Fri, 23 May 2003 08:51:51 +0000 Subject: iteritems() should not have been used for self.timeout which changes during the loop. --- Lib/urllib2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/urllib2.py b/Lib/urllib2.py index c64b7c1..ace3353 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -1012,7 +1012,7 @@ class CacheFTPHandler(FTPHandler): # first check for old ones t = time.time() if self.soonest <= t: - for k, v in self.timeout.iteritems(): + for k, v in self.timeout.items(): if v < t: self.cache[k].close() del self.cache[k] -- cgit v0.12