Catch !includes with unfound files
This commit is contained in:
1 parent
eeb483dc27
commit
ecbacde665
1 file changed
+2
-1
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user