mirror of
https://github.com/python/cpython.git
synced 2025-11-10 18:42:04 +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 @@ def makeport(self):
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue