diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-10-19 11:25:17 (GMT) |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-10-19 11:25:17 (GMT) |
commit | 89e92854b6d2c2d9d385795ea976d97ee2d97e65 (patch) | |
tree | 058cc14018acc55552912b1c37f41ae4d4cfd3f4 /Lib/urllib | |
parent | edbe30c7c7131a121c9d8a5652e1c63cdae11f1b (diff) | |
download | cpython-89e92854b6d2c2d9d385795ea976d97ee2d97e65.zip cpython-89e92854b6d2c2d9d385795ea976d97ee2d97e65.tar.gz cpython-89e92854b6d2c2d9d385795ea976d97ee2d97e65.tar.bz2 |
Fix issue #16270: urllib may hang when used for retrieving files via FTP by using a context manager.
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 67b4c79..88f3ce1 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -2326,13 +2326,7 @@ class ftpwrapper: return (ftpobj, retrlen) def endtransfer(self): - if not self.busy: - return self.busy = 0 - try: - self.ftp.voidresp() - except ftperrors(): - pass def close(self): self.keepalive = False |