Fix comment formatting (#15447)

This commit is contained in:
Paulus Schoutsen 2018-07-13 15:05:55 +02:00 committed by GitHub
parent a6ba5ec1c8
commit 84858f5c19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -311,12 +311,11 @@ class SshConnection(_Connection):
super().connect() super().connect()
def disconnect(self): \ def disconnect(self):
# pylint: disable=broad-except
"""Disconnect the current SSH connection.""" """Disconnect the current SSH connection."""
try: try:
self._ssh.logout() self._ssh.logout()
except Exception: except Exception: # pylint: disable=broad-except
pass pass
finally: finally:
self._ssh = None self._ssh = None
@ -379,12 +378,11 @@ class TelnetConnection(_Connection):
super().connect() super().connect()
def disconnect(self): \ def disconnect(self):
# pylint: disable=broad-except
"""Disconnect the current Telnet connection.""" """Disconnect the current Telnet connection."""
try: try:
self._telnet.write('exit\n'.encode('ascii')) self._telnet.write('exit\n'.encode('ascii'))
except Exception: except Exception: # pylint: disable=broad-except
pass pass
super().disconnect() super().disconnect()