- with open(filepath) as fh:
- rdt_yml = yaml.load(fh)
- nested_files.append(filepath)
- nested_files.extend(get_list_of_nested_files(rdt_yml, dirpath))
+ if path.exists(filepath):
+ with open(filepath) as fh:
+ rdt_yml = yaml.load(fh)
+ nested_files.append(filepath)
+ nested_files.extend(
+ get_list_of_nested_files(rdt_yml, dirpath))