mirror of
https://github.com/home-assistant/core.git
synced 2025-07-11 15:27:08 +00:00
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 call
This commit is contained in:
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
|
if (not hass.config.skip_pip and p_integration.requirements and
|
||||||
not await async_process_requirements(
|
not await async_process_requirements(
|
||||||
hass, p_integration.domain, p_integration.requirements)):
|
hass, p_integration.domain, p_integration.requirements)):
|
||||||
|
_LOGGER.error(
|
||||||
|
"Unable to install all requirements for %s.%s", domain, p_name)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
platform = p_integration.get_platform(domain)
|
platform = p_integration.get_platform(domain)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
_LOGGER.exception("Failed to get platform %s.%s", domain, p_name)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Validate platform specific schema
|
# Validate platform specific schema
|
||||||
|
@ -159,6 +159,15 @@ async def async_check_ha_config_file(hass: HomeAssistant) -> \
|
|||||||
"platform.".format(p_name, domain))
|
"platform.".format(p_name, domain))
|
||||||
continue
|
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:
|
try:
|
||||||
platform = p_integration.get_platform(domain)
|
platform = p_integration.get_platform(domain)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user