mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Catch CancelledError when setting up components (#88635)
* Catch CancelledError when setting up components * Catch CancelledError when setting up components * Also catch SystemExit
This commit is contained in:
parent
6512cd901f
commit
f2e4943a53
@ -463,7 +463,8 @@ class ConfigEntry:
|
|||||||
|
|
||||||
await self._async_process_on_unload()
|
await self._async_process_on_unload()
|
||||||
return
|
return
|
||||||
except Exception: # pylint: disable=broad-except
|
# pylint: disable-next=broad-except
|
||||||
|
except (asyncio.CancelledError, SystemExit, Exception):
|
||||||
_LOGGER.exception(
|
_LOGGER.exception(
|
||||||
"Error setting up entry %s for %s", self.title, integration.domain
|
"Error setting up entry %s for %s", self.title, integration.domain
|
||||||
)
|
)
|
||||||
|
@ -264,7 +264,8 @@ async def _async_setup_component(
|
|||||||
SLOW_SETUP_MAX_WAIT,
|
SLOW_SETUP_MAX_WAIT,
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
except Exception: # pylint: disable=broad-except
|
# pylint: disable-next=broad-except
|
||||||
|
except (asyncio.CancelledError, SystemExit, Exception):
|
||||||
_LOGGER.exception("Error during setup of component %s", domain)
|
_LOGGER.exception("Error during setup of component %s", domain)
|
||||||
async_notify_setup_error(hass, domain, integration.documentation)
|
async_notify_setup_error(hass, domain, integration.documentation)
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user