mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix comment formatting (#15447)
This commit is contained in:
parent
a6ba5ec1c8
commit
84858f5c19
@ -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()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user