diff options
-rw-r--r-- | paramiko/client.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/paramiko/client.py b/paramiko/client.py index ae70ac0b..c3cbcb9d 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -350,7 +350,8 @@ class SSHClient(ClosingContextManager): # Break out of the loop on success break except socket.error as e: - # As mentioned in socket docs - it is better to close sockets explicitly + # As mentioned in socket docs it is better + # to close sockets explicitly if sock: sock.close() # Raise anything that isn't a straight up connection error |