diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-12-17 19:46:16 (GMT) |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-12-17 19:46:16 (GMT) |
commit | 57f3487994b44be15d78834955080e8e6c0bc688 (patch) | |
tree | 113b011665582891edd17661add0a78b079dd55c /Lib | |
parent | b6693c4604f995ce965ede2f6a8f5b4252a1fa28 (diff) | |
download | cpython-57f3487994b44be15d78834955080e8e6c0bc688.zip cpython-57f3487994b44be15d78834955080e8e6c0bc688.tar.gz cpython-57f3487994b44be15d78834955080e8e6c0bc688.tar.bz2 |
Issue 16646 (ftplib): deliberately use intermediate variable after catching exception
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/ftplib.py | 3 |
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 |