diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-12-17 19:46:45 (GMT) |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-12-17 19:46:45 (GMT) |
commit | 5ee29491e57b7477921f71e8dacfe1e1a3336912 (patch) | |
tree | 41424cf3534fdf36ce0e871073cb84498c311856 | |
parent | 786fbd8db707c7cb302a1adf2b57a0b3f8ba078c (diff) | |
parent | b6375a2d91c71bb24bb4aac9fdb723e9d1fcb37d (diff) | |
download | cpython-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.py | 3 |
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 |