diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-10-19 13:34:32 +0200 |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-10-19 13:34:32 +0200 |
commit | b0cc91290cfa12621cb51eb0c7d6a0f223722346 (patch) | |
tree | e2f1ee4c52da50985d81142658705f4031fcdde3 /Lib/urllib/request.py | |
parent | 2ee776bcea795f0ef2247be9708251b3485a80a1 (diff) | |
download | cpython-git-b0cc91290cfa12621cb51eb0c7d6a0f223722346.tar.gz |
Fix issue #16270: urllib may hang when used for retrieving files via FTP by using a context manager.
Diffstat (limited to 'Lib/urllib/request.py')
-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 67b4c795b3..88f3ce1a26 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 |