commit | 57f3487994b44be15d78834955080e8e6c0bc688 | [log] [tgz] |
---|---|---|
author | Giampaolo Rodola' <g.rodola@gmail.com> | Mon Dec 17 20:46:16 2012 +0100 |
committer | Giampaolo Rodola' <g.rodola@gmail.com> | Mon Dec 17 20:46:16 2012 +0100 |
tree | 113b011665582891edd17661add0a78b079dd55c | |
parent | b6693c4604f995ce965ede2f6a8f5b4252a1fa28 [diff] |
Issue 16646 (ftplib): deliberately use intermediate variable after catching exception
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 @@ 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