diff options
Diffstat (limited to 'Lib/ftplib.py')
-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 |