Commit b6375a2d authored by Giampaolo Rodola's avatar Giampaolo Rodola

Issue 16646 (ftplib): deliberately use intermediate variable after catching exception

parents 3b69824d 57f34879
...@@ -295,7 +295,8 @@ class FTP: ...@@ -295,7 +295,8 @@ class FTP:
try: try:
sock = socket.socket(af, socktype, proto) sock = socket.socket(af, socktype, proto)
sock.bind(sa) sock.bind(sa)
except socket.error as err: except socket.error as _:
err = _
if sock: if sock:
sock.close() sock.close()
sock = None sock = None
......
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