summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGiampaolo Rodola' <g.rodola@gmail.com>2012-10-19 11:40:28 (GMT)
committerGiampaolo Rodola' <g.rodola@gmail.com>2012-10-19 11:40:28 (GMT)
commit2d51f687e133fb8141f1a6b5a6ac51c9d5eddf58 (patch)
treeea3eab5c7bb2907899c5f0d9f48886024b0fb163 /Lib
parent91044799f7c829404bff2191941f58c8ecbce897 (diff)
downloadcpython-2d51f687e133fb8141f1a6b5a6ac51c9d5eddf58.zip
cpython-2d51f687e133fb8141f1a6b5a6ac51c9d5eddf58.tar.gz
cpython-2d51f687e133fb8141f1a6b5a6ac51c9d5eddf58.tar.bz2
Fix issue #16270: urllib may hang when used for retrieving files via FTP by using a context manager.
Diffstat (limited to 'Lib')
-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 d6f9f9a..64092cf 100644
--- 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:
- return
self.busy = 0
- try:
- self.ftp.voidresp()
- except ftperrors():
- pass
def close(self):
self.keepalive = False