Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b6375a2

Browse files
committed
Issue 16646 (ftplib): deliberately use intermediate variable after catching exception
2 parents 3b69824 + 57f3487 commit b6375a2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/ftplib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ def makeport(self):
295295
try:
296296
sock = socket.socket(af, socktype, proto)
297297
sock.bind(sa)
298-
except socket.error as err:
298+
except socket.error as _:
299+
err = _
299300
if sock:
300301
sock.close()
301302
sock = None

0 commit comments

Comments
 (0)