summaryrefslogtreecommitdiffstats
path: root/Lib/ftplib.py
diff options
context:
space:
mode:
authorGiampaolo Rodola' <g.rodola@gmail.com>2012-12-17 19:46:29 (GMT)
committerGiampaolo Rodola' <g.rodola@gmail.com>2012-12-17 19:46:29 (GMT)
commitb6375a2d91c71bb24bb4aac9fdb723e9d1fcb37d (patch)
treef3bfc471a6d802a8744549ec09e57d950869c37f /Lib/ftplib.py
parent3b69824de9860899372d3b816a0601889e2a0031 (diff)
parent57f3487994b44be15d78834955080e8e6c0bc688 (diff)
downloadcpython-b6375a2d91c71bb24bb4aac9fdb723e9d1fcb37d.zip
cpython-b6375a2d91c71bb24bb4aac9fdb723e9d1fcb37d.tar.gz
cpython-b6375a2d91c71bb24bb4aac9fdb723e9d1fcb37d.tar.bz2
Issue 16646 (ftplib): deliberately use intermediate variable after catching exception
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r--Lib/ftplib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index 490f900..5efae95 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -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