summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-06-07 22:09:36 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-06-07 22:09:36 (GMT)
commitedb07d28fbfd526f0771b337b05c2e611d266981 (patch)
treef6918e3ba213ced7e984d0e0f9585ba84ac8647e /Lib/urllib
parent8dfd73a2b42917b07698f446e20ab296fdfe0ef2 (diff)
parent3c2dca67ac9cdc26fb02473e05723486ffc8d52b (diff)
downloadcpython-edb07d28fbfd526f0771b337b05c2e611d266981.zip
cpython-edb07d28fbfd526f0771b337b05c2e611d266981.tar.gz
cpython-edb07d28fbfd526f0771b337b05c2e611d266981.tar.bz2
merge 3.4 (#21463)
Diffstat (limited to 'Lib/urllib')
-rw-r--r--Lib/urllib/request.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 43d6caa..72e91dd 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -1911,7 +1911,7 @@ class URLopener:
# XXX thread unsafe!
if len(self.ftpcache) > MAXFTPCACHE:
# Prune the cache, rather arbitrarily
- for k in self.ftpcache.keys():
+ for k in list(self.ftpcache):
if k != key:
v = self.ftpcache[k]
del self.ftpcache[k]