Kaydet (Commit) b0cc9129 authored tarafından Giampaolo Rodola''s avatar Giampaolo Rodola'

Fix issue #16270: urllib may hang when used for retrieving files via FTP by…

Fix issue #16270: urllib may hang when used for retrieving files via FTP by using a context manager.
üst 2ee776bc
...@@ -2326,13 +2326,7 @@ class ftpwrapper: ...@@ -2326,13 +2326,7 @@ class ftpwrapper:
return (ftpobj, retrlen) return (ftpobj, retrlen)
def endtransfer(self): def endtransfer(self):
if not self.busy:
return
self.busy = 0 self.busy = 0
try:
self.ftp.voidresp()
except ftperrors():
pass
def close(self): def close(self):
self.keepalive = False self.keepalive = False
......
...@@ -43,6 +43,9 @@ Core and Builtins ...@@ -43,6 +43,9 @@ Core and Builtins
Library Library
------- -------
- Issue #16270: urllib may hang when used for retrieving files via FTP by using
a context manager. Patch by Giampaolo Rodola'.
- Issue #16176: Properly identify Windows 8 via platform.platform() - Issue #16176: Properly identify Windows 8 via platform.platform()
- Issue #16114: The subprocess module no longer provides a misleading error - Issue #16114: The subprocess module no longer provides a misleading error
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment