Issue 16646 (ftplib): deliberately use intermediate variable after catching exception
This commit is contained in:
commit
5ee29491e5
|
@ -295,7 +295,8 @@ class FTP:
|
|||
try:
|
||||
sock = socket.socket(af, socktype, proto)
|
||||
sock.bind(sa)
|
||||
except socket.error as err:
|
||||
except socket.error as _:
|
||||
err = _
|
||||
if sock:
|
||||
sock.close()
|
||||
sock = None
|
||||
|
|
Loading…
Reference in New Issue