mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
merge 3.4 (#21463)
This commit is contained in:
commit
edb07d28fb
4 changed files with 35 additions and 2 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue