parse timeout exception during renewing
This commit is contained in:
parent
0fab86024f
commit
e808608e94
@ -235,14 +235,14 @@ class ComputerSwitch(SwitchEntity):
|
||||
|
||||
try:
|
||||
self._connection.open()
|
||||
except NoValidConnectionsError and SSHException as error:
|
||||
_LOGGER.error("Could not connect to %s: %s", self._host, error)
|
||||
self._state = False
|
||||
return
|
||||
except AuthenticationException as error:
|
||||
_LOGGER.error("Could not authenticate to %s: %s", self._host, error)
|
||||
self._state = False
|
||||
return
|
||||
except Exception as error:
|
||||
_LOGGER.error("Could not connect to %s: %s", self._host, error)
|
||||
self._state = False
|
||||
return
|
||||
|
||||
self._attr_extra_state_attributes = {
|
||||
"operating_system": utils.get_operating_system(self._connection),
|
||||
|
Loading…
Reference in New Issue
Block a user