1
0
mirror of https://github.com/openshift/openshift-ansible.git synced 2026-02-05 15:45:57 +01:00

setup.py: revert safe_load_all change

This commit is contained in:
Vadim Rutkovsky
2018-04-30 11:24:32 +02:00
parent 9f771c7538
commit e509bc2cf8

View File

@@ -79,7 +79,7 @@ def find_playbooks():
os.path.join(os.getcwd(), 'playbooks'),
exclude_dirs, None, r'\.ya?ml$'):
with open(yaml_file, 'r') as contents:
for task in yaml.safe_load_all(contents) or {}:
for task in yaml.safe_load(contents) or {}:
if not isinstance(task, dict):
# Skip yaml files which are not a dictionary of tasks
continue
@@ -323,7 +323,7 @@ class OpenShiftAnsibleSyntaxCheck(Command):
for yaml_file in find_files(
os.getcwd(), exclude_dirs, None, r'\.ya?ml$'):
with open(yaml_file, 'r') as contents:
yaml_contents = yaml.safe_load_all(contents)
yaml_contents = yaml.safe_load(contents)
if not isinstance(yaml_contents, list):
continue