summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorGiampaolo Rodola' <g.rodola@gmail.com>2012-10-19 11:25:17 (GMT)
committerGiampaolo Rodola' <g.rodola@gmail.com>2012-10-19 11:25:17 (GMT)
commit89e92854b6d2c2d9d385795ea976d97ee2d97e65 (patch)
tree058cc14018acc55552912b1c37f41ae4d4cfd3f4 /Lib/urllib
parentedbe30c7c7131a121c9d8a5652e1c63cdae11f1b (diff)
downloadcpython-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.py6
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