iteritems() should not have been used for self.timeout which changes during the loop.

This commit is contained in:
Raymond Hettinger 2003-05-23 08:51:51 +00:00
parent bfef18ca0e
commit 4ec4fa208e

View file

@ -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]