Fix loading empty yaml files with include_dir_named (#107853)
This commit is contained in:
parent
5afe155cd9
commit
6cab4486f7
2 changed files with 2 additions and 5 deletions
|
@ -359,10 +359,7 @@ def _include_dir_named_yaml(loader: LoaderType, node: yaml.nodes.Node) -> NodeDi
|
|||
filename = os.path.splitext(os.path.basename(fname))[0]
|
||||
if os.path.basename(fname) == SECRET_YAML:
|
||||
continue
|
||||
loaded_yaml = load_yaml(fname, loader.secrets)
|
||||
if loaded_yaml is None:
|
||||
continue
|
||||
mapping[filename] = loaded_yaml
|
||||
mapping[filename] = load_yaml(fname, loader.secrets)
|
||||
return _add_reference(mapping, loader, node)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue