summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiampaolo Rodola' <g.rodola@gmail.com>2012-12-17 19:46:45 (GMT)
committerGiampaolo Rodola' <g.rodola@gmail.com>2012-12-17 19:46:45 (GMT)
commit5ee29491e57b7477921f71e8dacfe1e1a3336912 (patch)
tree41424cf3534fdf36ce0e871073cb84498c311856
parent786fbd8db707c7cb302a1adf2b57a0b3f8ba078c (diff)
parentb6375a2d91c71bb24bb4aac9fdb723e9d1fcb37d (diff)
downloadcpython-5ee29491e57b7477921f71e8dacfe1e1a3336912.zip
cpython-5ee29491e57b7477921f71e8dacfe1e1a3336912.tar.gz
cpython-5ee29491e57b7477921f71e8dacfe1e1a3336912.tar.bz2
Issue 16646 (ftplib): deliberately use intermediate variable after catching exception
-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