Skip to content

Commit 3556633

Browse files
committed
kernelci.config: fix validate_yaml() for list of dicts
Config entries that are a list of strings can be sorted, but lists of dicts can't. Skip the alphabetical order check for those (e.g. the scheduler configs). Fixes: 7e936c9 ("kernelci.config: add validate_yaml() method") Signed-off-by: Guillaume Tucker <[email protected]>
1 parent 81d9012 commit 3556633

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kernelci/config/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ def validate_yaml(config_paths, entries):
6666
if isinstance(value, dict):
6767
keys = value.keys()
6868
elif isinstance(value, list):
69-
keys = value
69+
keys = (
70+
[] if len(value) and isinstance(value[0], dict)
71+
else value
72+
)
7073
else:
7174
keys = []
7275
err = kernelci.sort_check(keys)

0 commit comments

Comments
 (0)