Uncancel task when swallowing CancelledError (#101884)
This commit is contained in:
parent
d712a29052
commit
f330bc0f97
1 changed files with 3 additions and 0 deletions
|
@ -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 "
|
||||
|
|
Loading…
Add table
Reference in a new issue