From: Raymond Hettinger Date: Fri, 23 May 2003 08:51:51 +0000 (+0000) Subject: iteritems() should not have been used for self.timeout which changes during the loop. X-Git-Tag: v2.3c1~631 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4ec4fa208e50d0f384ce2bec65c8612cb5029996;p=thirdparty%2FPython%2Fcpython.git iteritems() should not have been used for self.timeout which changes during the loop. --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index c64b7c10ec0c..ace335312c16 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]