mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Fix Fritz shutdown race condition (#57148)
This commit is contained in:
parent
9de3bd77d8
commit
d51d70d3be
@ -228,7 +228,12 @@ class FritzBoxTools:
|
|||||||
|
|
||||||
def _update_hosts_info(self) -> list[HostInfo]:
|
def _update_hosts_info(self) -> list[HostInfo]:
|
||||||
"""Retrieve latest hosts information from the FRITZ!Box."""
|
"""Retrieve latest hosts information from the FRITZ!Box."""
|
||||||
|
try:
|
||||||
return self.fritz_hosts.get_hosts_info() # type: ignore [no-any-return]
|
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]:
|
def _update_device_info(self) -> tuple[bool, str | None]:
|
||||||
"""Retrieve latest device information from the FRITZ!Box."""
|
"""Retrieve latest device information from the FRITZ!Box."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user