cpython: 7f0d9637a3ad (original) (raw)
Mercurial > cpython
changeset 79826:7f0d9637a3ad 3.2
Fix issue #16270: urllib may hang when used for retrieving files via FTP by using a context manager. [#16270]
Giampaolo Rodola' g.rodola@gmail.com | |
---|---|
date | Fri, 19 Oct 2012 13:40:28 +0200 |
parents | bedb2903d71e |
children | 1856d57abfc8 |
files | Lib/urllib/request.py Misc/NEWS |
diffstat | 2 files changed, 3 insertions(+), 6 deletions(-)[+] [-] Lib/urllib/request.py 6 Misc/NEWS 3 |
line wrap: on
line diff
--- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -2212,13 +2212,7 @@ class ftpwrapper: return (ftpobj, retrlen) def endtransfer(self):
if not self.busy:[](#l1.7)
return[](#l1.8) self.busy = 0[](#l1.9)
try:[](#l1.10)
self.ftp.voidresp()[](#l1.11)
except ftperrors():[](#l1.12)
pass[](#l1.13)
def close(self): self.keepalive = False
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -129,6 +129,9 @@ Core and Builtins Library ------- +- Issue #16270: urllib may hang when used for retrieving files via FTP by using