mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
Issue 16646 (ftplib): deliberately use intermediate variable after catching exception
This commit is contained in:
commit
b6375a2d91
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue