mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-25 10:06:34 +00:00
Log config check (#1583)
* Add more log for config check to debug * Convert to ascii * fix comment
This commit is contained in:
parent
98b969ef06
commit
4a20344652
@ -465,13 +465,16 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
|
|||||||
"python3 -m homeassistant -c /config --script check_config"
|
"python3 -m homeassistant -c /config --script check_config"
|
||||||
)
|
)
|
||||||
|
|
||||||
# if not valid
|
# If not valid
|
||||||
if result.exit_code is None:
|
if result.exit_code is None:
|
||||||
_LOGGER.error("Fatal error on config check!")
|
_LOGGER.error("Fatal error on config check!")
|
||||||
raise HomeAssistantError()
|
raise HomeAssistantError()
|
||||||
|
|
||||||
# parse output
|
# Convert output
|
||||||
log = convert_to_ascii(result.output)
|
log = convert_to_ascii(result.output)
|
||||||
|
_LOGGER.debug("Result config check: %s", log.strip())
|
||||||
|
|
||||||
|
# Parse output
|
||||||
if result.exit_code != 0 or RE_YAML_ERROR.search(log):
|
if result.exit_code != 0 or RE_YAML_ERROR.search(log):
|
||||||
_LOGGER.error("Invalid Home Assistant config found!")
|
_LOGGER.error("Invalid Home Assistant config found!")
|
||||||
return ConfigResult(False, log)
|
return ConfigResult(False, log)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user