Log platform import errors and correct reqs for config check (#25425)
* Log failures to load plaforms * Drop unused exception variable * Also load pip requirements with check config * Fix lint * More lint * Drop invalid parameters for error callpull/25561/head
parent
35c048fe6b
commit
3d11c45edd
|
@ -706,11 +706,14 @@ async def async_process_component_config(
|
|||
if (not hass.config.skip_pip and p_integration.requirements and
|
||||
not await async_process_requirements(
|
||||
hass, p_integration.domain, p_integration.requirements)):
|
||||
_LOGGER.error(
|
||||
"Unable to install all requirements for %s.%s", domain, p_name)
|
||||
continue
|
||||
|
||||
try:
|
||||
platform = p_integration.get_platform(domain)
|
||||
except ImportError:
|
||||
_LOGGER.exception("Failed to get platform %s.%s", domain, p_name)
|
||||
continue
|
||||
|
||||
# Validate platform specific schema
|
||||
|
|
|
@ -159,6 +159,15 @@ async def async_check_ha_config_file(hass: HomeAssistant) -> \
|
|||
"platform.".format(p_name, domain))
|
||||
continue
|
||||
|
||||
if (not hass.config.skip_pip and p_integration.requirements and
|
||||
not await requirements.async_process_requirements(
|
||||
hass, p_integration.domain,
|
||||
p_integration.requirements)):
|
||||
result.add_error(
|
||||
"Unable to install all requirements: {}".format(
|
||||
', '.join(integration.requirements)))
|
||||
continue
|
||||
|
||||
try:
|
||||
platform = p_integration.get_platform(domain)
|
||||
except ImportError:
|
||||
|
|
Loading…
Reference in New Issue