import sys
import yaml
import gzip
+import lzma
from voluptuous import Schema, Required, All, Any, Length, Range, Match, Url
from optparse import OptionParser
f = None
if fname.endswith(".gz"):
f = gzip.open(fname, 'r')
+ elif fname.endswith(".xz"):
+ f = lzma.open(fname, 'r')
else:
f = open(fname, 'r')
ret = True
for root, subfolders, files in os.walk(dirname):
for fname in files:
- if fname.endswith(".yml.gz"):
+ if fname.endswith(".yml.gz") or fname.endswith(".yml.xz"):
if not validate_file(os.path.join(root, fname)):
ret = False