Issue #23881: urllib.ftpwrapper constructor now closes the socket if the FTP
connection failed.
This commit is contained in:
parent
d27bcbd706
commit
5ab1c01bfd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue