From f330bc0f97da92ca6c6bf893dffeac2ddc22ab5d Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Fri, 13 Oct 2023 10:23:32 +0200 Subject: [PATCH] Uncancel task when swallowing CancelledError (#101884) --- homeassistant/components/reolink/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/reolink/__init__.py b/homeassistant/components/reolink/__init__.py index 5cfb2ceecb7..fd62f8451fb 100644 --- a/homeassistant/components/reolink/__init__.py +++ b/homeassistant/components/reolink/__init__.py @@ -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 "