Commit 5ab1c01b authored by Victor Stinner's avatar Victor Stinner

Issue #23881: urllib.ftpwrapper constructor now closes the socket if the FTP

connection failed.
parent d27bcbd7
......@@ -871,7 +871,11 @@ class ftpwrapper:
self.timeout = timeout
self.refcount = 0
self.keepalive = persistent
self.init()
try:
self.init()
except:
self.close()
raise
def init(self):
import ftplib
......
......@@ -21,6 +21,9 @@ Core and Builtins
Library
-------
- Issue #23881: urllib.ftpwrapper constructor now closes the socket if the FTP
connection failed.
- Issue #15133: _tkinter.tkapp.getboolean() now supports long and Tcl_Obj and
always returns bool. tkinter.BooleanVar now validates input values (accepted
bool, int, long, str, unicode, and Tcl_Obj). tkinter.BooleanVar.get() now
......
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