]> granicus.if.org Git - python/commitdiff
Closes issue26960.
authorSenthil Kumaran <senthil@uthcode.com>
Tue, 10 May 2016 08:12:55 +0000 (01:12 -0700)
committerSenthil Kumaran <senthil@uthcode.com>
Tue, 10 May 2016 08:12:55 +0000 (01:12 -0700)
Backport issue16270: Fix for urllib hanging with ftp urls.

Lib/urllib.py

index 055707ff1efa780b91a67e87e63cce4511a2b82d..139fab907ef056dd7040ec84c221d55ac60ef62c 100644 (file)
@@ -932,13 +932,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