1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Avoid falling back to event loop import on ModuleNotFound (#115404)

This commit is contained in:
J. Nick Koston
2024-04-11 16:32:47 -10:00
committed by GitHub
parent 28bdbec14e
commit fb5fc136e8
2 changed files with 94 additions and 0 deletions

View File

@@ -976,6 +976,8 @@ class Integration:
comp = await self.hass.async_add_import_executor_job(
self._get_component, True
)
except ModuleNotFoundError:
raise
except ImportError as ex:
load_executor = False
_LOGGER.debug(
@@ -1115,6 +1117,8 @@ class Integration:
self._load_platforms, platform_names
)
)
except ModuleNotFoundError:
raise
except ImportError as ex:
_LOGGER.debug(
"Failed to import %s platforms %s in executor",