added support for .yaml along with .yml
diff --git a/reclass/storage/yaml_fs/__init__.py b/reclass/storage/yaml_fs/__init__.py
index 20e8eec..e47ea91 100644
--- a/reclass/storage/yaml_fs/__init__.py
+++ b/reclass/storage/yaml_fs/__init__.py
@@ -21,7 +21,7 @@
from reclass.datatypes import Entity
import reclass.errors
-FILE_EXTENSION = '.yml'
+FILE_EXTENSION = ('.yml', '.yaml')
STORAGE_NAME = 'yaml_fs'
def vvv(msg):
@@ -71,7 +71,7 @@
def _enumerate_inventory(self, basedir, name_mangler):
ret = {}
def register_fn(dirpath, filenames):
- filenames = fnmatch.filter(filenames, '*{0}'.format(FILE_EXTENSION))
+ filenames = [f for f in filenames if f.endswith(FILE_EXTENSION)]
vvv('REGISTER {0} in path {1}'.format(filenames, dirpath))
for f in filenames:
name = os.path.splitext(f)[0]
diff --git a/reclass/storage/yaml_fs/directory.py b/reclass/storage/yaml_fs/directory.py
index a8916b3..4e11643 100644
--- a/reclass/storage/yaml_fs/directory.py
+++ b/reclass/storage/yaml_fs/directory.py
@@ -15,7 +15,7 @@
from reclass.errors import NotFoundError
SKIPDIRS = ('CVS', 'SCCS')
-FILE_EXTENSION = '.yml'
+FILE_EXTENSION = ('.yml', '.yaml')
def vvv(msg):
#print(msg, file=sys.stderr)