summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-05-23 08:51:51 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-05-23 08:51:51 (GMT)
commit4ec4fa208e50d0f384ce2bec65c8612cb5029996 (patch)
tree9b610631565d1792da5642dec741db0058236652 /Lib
parentbfef18ca0eff6800f40c7591f1c24a75998d06a6 (diff)
downloadcpython-4ec4fa208e50d0f384ce2bec65c8612cb5029996.zip
cpython-4ec4fa208e50d0f384ce2bec65c8612cb5029996.tar.gz
cpython-4ec4fa208e50d0f384ce2bec65c8612cb5029996.tar.bz2
iteritems() should not have been used for self.timeout which changes during the loop.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/urllib2.py2
1 files changed, 1 insertions, 1 deletions
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]