Uncancel task when swallowing CancelledError (#101884)

This commit is contained in:
starkillerOG 2023-10-13 10:23:32 +02:00 committed by GitHub
parent d712a29052
commit f330bc0f97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 "