X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vvp%2Fvalidation-scripts.git;a=blobdiff_plain;f=ice_validator%2Ftests%2Fhelpers.py;h=37fd01f0dc9bab88585296560b4fe3e0255879b9;hp=82d0201086eaa47374dd9d4710644bac60f63087;hb=06511c3ae3ed91250586d4b1c14130d83eaa64c8;hpb=20b8e673c02ed57cc2393b81bbdda3904ed91da5 diff --git a/ice_validator/tests/helpers.py b/ice_validator/tests/helpers.py old mode 100644 new mode 100755 index 82d0201..37fd01f --- a/ice_validator/tests/helpers.py +++ b/ice_validator/tests/helpers.py @@ -55,10 +55,11 @@ def check_basename_ending(template_type, basename): return not basename.endswith('_volume') -def get_parsed_yml_for_yaml_files(yaml_files, sections=[]): +def get_parsed_yml_for_yaml_files(yaml_files, sections=None): ''' get the parsed yaml for a list of yaml files ''' + sections = [] if sections is None else sections parsed_yml_list = [] for yaml_file in yaml_files: yml = '' @@ -67,8 +68,8 @@ def get_parsed_yml_for_yaml_files(yaml_files, sections=[]): with open(yaml_file) as fh: yml = yaml.load(fh) except Exception as e: - print(e) - + print('Error in %s: %s' % (yaml_file, e)) + continue if yml: if sections: for k in yml.keys():