Fix comment formatting (#15447)
This commit is contained in:
@@ -311,12 +311,11 @@ class SshConnection(_Connection):
|
||||
|
||||
super().connect()
|
||||
|
||||
def disconnect(self): \
|
||||
# pylint: disable=broad-except
|
||||
def disconnect(self):
|
||||
"""Disconnect the current SSH connection."""
|
||||
try:
|
||||
self._ssh.logout()
|
||||
except Exception:
|
||||
except Exception: # pylint: disable=broad-except
|
||||
pass
|
||||
finally:
|
||||
self._ssh = None
|
||||
@@ -379,12 +378,11 @@ class TelnetConnection(_Connection):
|
||||
|
||||
super().connect()
|
||||
|
||||
def disconnect(self): \
|
||||
# pylint: disable=broad-except
|
||||
def disconnect(self):
|
||||
"""Disconnect the current Telnet connection."""
|
||||
try:
|
||||
self._telnet.write('exit\n'.encode('ascii'))
|
||||
except Exception:
|
||||
except Exception: # pylint: disable=broad-except
|
||||
pass
|
||||
|
||||
super().disconnect()
|
||||
|
||||
Reference in New Issue
Block a user