Commit e0632cb9 by Brian Coca

Merge pull request #11577 from srvg/yaml_file_extensions

Use YAML_FILENAME_EXTENSIONS for vars files.
parents 5daa540b d5fb11d8
...@@ -315,11 +315,11 @@ class VariableManager: ...@@ -315,11 +315,11 @@ class VariableManager:
file_name, ext = os.path.splitext(path) file_name, ext = os.path.splitext(path)
data = None data = None
if not ext: if not ext:
for ext in ('', '.yml', '.yaml'): for ext in C.YAML_FILENAME_EXTENSIONS:
new_path = path + ext new_path = path + ext
if loader.path_exists(new_path): if loader.path_exists(new_path):
data = loader.load_from_file(new_path) data = loader.load_from_file(new_path)
break break
else: else:
if loader.path_exists(path): if loader.path_exists(path):
data = loader.load_from_file(path) data = loader.load_from_file(path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment