summaryrefslogtreecommitdiffstats
path: root/Lib/ftplib.py
diff options
context:
space:
mode:
authorGiampaolo Rodola' <g.rodola@gmail.com>2012-12-17 19:46:16 (GMT)
committerGiampaolo Rodola' <g.rodola@gmail.com>2012-12-17 19:46:16 (GMT)
commit57f3487994b44be15d78834955080e8e6c0bc688 (patch)
tree113b011665582891edd17661add0a78b079dd55c /Lib/ftplib.py
parentb6693c4604f995ce965ede2f6a8f5b4252a1fa28 (diff)
downloadcpython-57f3487994b44be15d78834955080e8e6c0bc688.zip
cpython-57f3487994b44be15d78834955080e8e6c0bc688.tar.gz
cpython-57f3487994b44be15d78834955080e8e6c0bc688.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 94237ca..a0f0f90 100644
--- a/Lib/ftplib.py
+++ b/Lib/ftplib.py
@@ -291,7 +291,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