Use YAML_FILENAME_EXTENSIONS for vars files.

The v2 codebase didn't use this previously introduced constant yet.

C.YAML_FILENAME_EXTENSIONS
This commit is contained in:
Serge van Ginderachter 2015-07-14 00:20:04 +02:00
parent c4b6d91275
commit d5fb11d89c

View file

@ -314,7 +314,7 @@ class VariableManager:
file_name, ext = os.path.splitext(path)
data = None
if not ext:
for ext in ('', '.yml', '.yaml'):
for ext in C.YAML_FILENAME_EXTENSIONS:
new_path = path + ext
if loader.path_exists(new_path):
data = loader.load_from_file(new_path)