From 5f31b48f1d43b0d9170a650d4dc2f74a62b476c0 Mon Sep 17 00:00:00 2001 From: zhumuht <40521367+zhumuht@users.noreply.github.com> Date: Mon, 20 Jan 2020 14:05:10 +0800 Subject: [PATCH] print component import error to logfile (#30346) --- homeassistant/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/setup.py b/homeassistant/setup.py index 2b96bb3ea9d..f62228b28f5 100644 --- a/homeassistant/setup.py +++ b/homeassistant/setup.py @@ -134,8 +134,8 @@ async def _async_setup_component( # So we do it before validating config to catch these errors. try: component = integration.get_component() - except ImportError: - log_error("Unable to import component", integration.documentation) + except ImportError as err: + log_error(f"Unable to import component: {err}", integration.documentation) return False except Exception: # pylint: disable=broad-except _LOGGER.exception("Setup failed for %s: unknown error", domain)