Uncancel task when swallowing CancelledError (#101884)

This commit is contained in:
starkillerOG 2023-10-13 10:23:32 +02:00 committed by Franck Nijhof
parent 497da016af
commit e3122ec6dc
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -95,6 +95,9 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
try:
return await host.api.check_new_firmware()
except (ReolinkError, asyncio.exceptions.CancelledError) as err:
task = asyncio.current_task()
if task is not None:
task.uncancel()
if starting:
_LOGGER.debug(
"Error checking Reolink firmware update at startup "