From 981d07c74a1611d8c308a96f59899fff66674c1a Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Fri, 5 Jun 2020 11:26:56 +0200 Subject: [PATCH] intel: fix gen_sort_tags.py The script was failing for me (python 3.8), not sure if this is a recent python version break or not as I don't know how often people have been running this script: Processing ./gen9.xml... Traceback (most recent call last): File "./gen_sort_tags.py", line 177, in main() File "./gen_sort_tags.py", line 170, in main genxml[:] = enums + sorted_structs.values() + instructions + registers TypeError: can only concatenate list (not "odict_values") to list Turning the odict into a list fixes it for me, and the resulting xml file are identical to before :) Fixes: 903e142f0d35bc550ffd ("genxml: add a sorting script") Signed-off-by: Eric Engestrom Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/genxml/gen_sort_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/genxml/gen_sort_tags.py b/src/intel/genxml/gen_sort_tags.py index 8543dabc7a1..953c0fe55b8 100755 --- a/src/intel/genxml/gen_sort_tags.py +++ b/src/intel/genxml/gen_sort_tags.py @@ -163,7 +163,7 @@ def process(filename): for r in registers: r[:] = sorted(r.getchildren(), key=get_start) - genxml[:] = enums + sorted_structs.values() + instructions + registers + genxml[:] = enums + list(sorted_structs.values()) + instructions + registers with open(filename, 'w') as f: f.write('\n') -- 2.30.2