mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 07:43:34 +08:00
validate_yaml.py: fix for python3
RuntimeError: dictionary changed size during iteration
This commit is contained in:
@@ -54,7 +54,7 @@ for yaml_file in yaml_files:
|
|||||||
if verbose: print("Validating {:}".format(yaml_file))
|
if verbose: print("Validating {:}".format(yaml_file))
|
||||||
document = load_yaml_file(yaml_file)
|
document = load_yaml_file(yaml_file)
|
||||||
# ignore top-level entries prefixed with __
|
# ignore top-level entries prefixed with __
|
||||||
for key in document.keys():
|
for key in list(document.keys()):
|
||||||
if key.startswith('__'): del document[key]
|
if key.startswith('__'): del document[key]
|
||||||
|
|
||||||
if not validator.validate(document):
|
if not validator.validate(document):
|
||||||
|
|||||||
Reference in New Issue
Block a user