Commit 4ec4fa20 authored by Raymond Hettinger's avatar Raymond Hettinger

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

parent bfef18ca
...@@ -1012,7 +1012,7 @@ class CacheFTPHandler(FTPHandler): ...@@ -1012,7 +1012,7 @@ class CacheFTPHandler(FTPHandler):
# first check for old ones # first check for old ones
t = time.time() t = time.time()
if self.soonest <= t: if self.soonest <= t:
for k, v in self.timeout.iteritems(): for k, v in self.timeout.items():
if v < t: if v < t:
self.cache[k].close() self.cache[k].close()
del self.cache[k] del self.cache[k]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment