summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-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