Fix Fritz shutdown race condition (#57148)
This commit is contained in:
parent
9de3bd77d8
commit
d51d70d3be
1 changed files with 6 additions and 1 deletions
|
@ -228,7 +228,12 @@ class FritzBoxTools:
|
|||
|
||||
def _update_hosts_info(self) -> list[HostInfo]:
|
||||
"""Retrieve latest hosts information from the FRITZ!Box."""
|
||||
return self.fritz_hosts.get_hosts_info() # type: ignore [no-any-return]
|
||||
try:
|
||||
return self.fritz_hosts.get_hosts_info() # type: ignore [no-any-return]
|
||||
except Exception as ex: # pylint: disable=[broad-except]
|
||||
if not self.hass.is_stopping:
|
||||
raise HomeAssistantError("Error refreshing hosts info") from ex
|
||||
return []
|
||||
|
||||
def _update_device_info(self) -> tuple[bool, str | None]:
|
||||
"""Retrieve latest device information from the FRITZ!Box."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue