Catch !includes with unfound files
This commit is contained in:
parent
eeb483dc27
commit
ecbacde665
@ -31,10 +31,11 @@ def load_yaml(fname, args={}):
|
|||||||
except loader.yaml.YAMLError as exc:
|
except loader.yaml.YAMLError as exc:
|
||||||
_LOGGER.error(str(exc))
|
_LOGGER.error(str(exc))
|
||||||
raise HomeAssistantError(exc)
|
raise HomeAssistantError(exc)
|
||||||
except UnicodeDecodeError as exc:
|
except (UnicodeDecodeError, FileNotFoundError) as exc:
|
||||||
_LOGGER.error("Unable to read file %s: %s", fname, exc)
|
_LOGGER.error("Unable to read file %s: %s", fname, exc)
|
||||||
raise HomeAssistantError(exc)
|
raise HomeAssistantError(exc)
|
||||||
|
|
||||||
|
|
||||||
def _include_yaml(ldr, node):
|
def _include_yaml(ldr, node):
|
||||||
args = {}
|
args = {}
|
||||||
if isinstance(node.value, str):
|
if isinstance(node.value, str):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user