mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Fix issue #16270: urllib may hang when used for retrieving files via FTP by using a context manager.
This commit is contained in:
parent
edbe30c7c7
commit
89e92854b6
2 changed files with 3 additions and 6 deletions
|
@ -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
|
||||||
|
|
|
@ -53,6 +53,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 #16088: BaseHTTPRequestHandler's send_error method includes a
|
- Issue #16088: BaseHTTPRequestHandler's send_error method includes a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue