Catch !includes with unfound files

This commit is contained in:
Thomas Lovén 2019-08-08 10:51:36 +02:00
parent eeb483dc27
commit ecbacde665

View File

@ -31,10 +31,11 @@ def load_yaml(fname, args={}):
except loader.yaml.YAMLError as exc:
_LOGGER.error(str(exc))
raise HomeAssistantError(exc)
except UnicodeDecodeError as exc:
except (UnicodeDecodeError, FileNotFoundError) as exc:
_LOGGER.error("Unable to read file %s: %s", fname, exc)
raise HomeAssistantError(exc)
def _include_yaml(ldr, node):
args = {}
if isinstance(node.value, str):