mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
print component import error to logfile (#30346)
This commit is contained in:
parent
e535133016
commit
5f31b48f1d
@ -134,8 +134,8 @@ async def _async_setup_component(
|
|||||||
# So we do it before validating config to catch these errors.
|
# So we do it before validating config to catch these errors.
|
||||||
try:
|
try:
|
||||||
component = integration.get_component()
|
component = integration.get_component()
|
||||||
except ImportError:
|
except ImportError as err:
|
||||||
log_error("Unable to import component", integration.documentation)
|
log_error(f"Unable to import component: {err}", integration.documentation)
|
||||||
return False
|
return False
|
||||||
except Exception: # pylint: disable=broad-except
|
except Exception: # pylint: disable=broad-except
|
||||||
_LOGGER.exception("Setup failed for %s: unknown error", domain)
|
_LOGGER.exception("Setup failed for %s: unknown error", domain)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user