]> granicus.if.org Git - python/commitdiff
Issue 16646 (ftplib): deliberately use intermediate variable after catching exception
authorGiampaolo Rodola' <g.rodola@gmail.com>
Mon, 17 Dec 2012 19:46:16 +0000 (20:46 +0100)
committerGiampaolo Rodola' <g.rodola@gmail.com>
Mon, 17 Dec 2012 19:46:16 +0000 (20:46 +0100)
Lib/ftplib.py

index 94237caf214522615e77d31d9fbb420c1c058a78..a0f0f90fd0ec91ca4746de7ea3866839a984ec84 100644 (file)
@@ -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