Log errors when loading yaml (#6257)
This commit is contained in:
parent
a0256e1947
commit
ac49298c8d
4 changed files with 25 additions and 9 deletions
|
@ -239,7 +239,11 @@ def load_yaml_config_file(config_path):
|
|||
|
||||
This method needs to run in an executor.
|
||||
"""
|
||||
conf_dict = load_yaml(config_path)
|
||||
try:
|
||||
conf_dict = load_yaml(config_path)
|
||||
except FileNotFoundError as err:
|
||||
raise HomeAssistantError("Config file not found: {}".format(
|
||||
getattr(err, 'filename', err)))
|
||||
|
||||
if not isinstance(conf_dict, dict):
|
||||
msg = 'The configuration file {} does not contain a dictionary'.format(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue