commit | 4ec4fa208e50d0f384ce2bec65c8612cb5029996 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Fri May 23 08:51:51 2003 +0000 |
committer | Raymond Hettinger <python@rcn.com> | Fri May 23 08:51:51 2003 +0000 |
tree | 9b610631565d1792da5642dec741db0058236652 | |
parent | bfef18ca0eff6800f40c7591f1c24a75998d06a6 [diff] [blame] |
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 c64b7c1..ace3353 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py
@@ -1012,7 +1012,7 @@ # 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]