mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Allow IntegrationNotFound when checking config in safe mode (#56283)
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
This commit is contained in:
@@ -125,8 +125,12 @@ async def async_check_ha_config_file( # noqa: C901
|
||||
for domain in components:
|
||||
try:
|
||||
integration = await async_get_integration_with_requirements(hass, domain)
|
||||
except (RequirementsNotFound, loader.IntegrationNotFound) as ex:
|
||||
result.add_error(f"Component error: {domain} - {ex}")
|
||||
except loader.IntegrationNotFound as ex:
|
||||
if not hass.config.safe_mode:
|
||||
result.add_error(f"Integration error: {domain} - {ex}")
|
||||
continue
|
||||
except RequirementsNotFound as ex:
|
||||
result.add_error(f"Integration error: {domain} - {ex}")
|
||||
continue
|
||||
|
||||
try:
|
||||
@@ -210,8 +214,11 @@ async def async_check_ha_config_file( # noqa: C901
|
||||
hass, p_name
|
||||
)
|
||||
platform = p_integration.get_platform(domain)
|
||||
except loader.IntegrationNotFound as ex:
|
||||
if not hass.config.safe_mode:
|
||||
result.add_error(f"Platform error {domain}.{p_name} - {ex}")
|
||||
continue
|
||||
except (
|
||||
loader.IntegrationNotFound,
|
||||
RequirementsNotFound,
|
||||
ImportError,
|
||||
) as ex:
|
||||
|
||||
Reference in New Issue
Block a user