validate_yaml.py: fix for python3

RuntimeError: dictionary changed size during iteration
This commit is contained in:
Beat Küng 2019-07-16 13:54:19 +02:00 committed by Daniel Agar
parent 8e5aaff76b
commit c869cb0ea5
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ for yaml_file in yaml_files:
if verbose: print("Validating {:}".format(yaml_file))
document = load_yaml_file(yaml_file)
# ignore top-level entries prefixed with __
for key in document.keys():
for key in list(document.keys()):
if key.startswith('__'): del document[key]
if not validator.validate(document):