[igt-dev] [PATCH i-g-t v2 10/13] scripts/test_list.py: add a check before deleting properties

Mauro Carvalho Chehab mauro.chehab at linux.intel.com
Wed Jul 12 13:58:51 UTC 2023


From: Mauro Carvalho Chehab <mchehab at kernel.org>

If the config file doesn't have empty _properties_, the current
logic causes an error. Well, if one is passing a dictionary via
config_dict, it may end using a simplified dict without any
_properties_ on it.

Add an extra check to avoid an error.

Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>
---
 scripts/test_list.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/test_list.py b/scripts/test_list.py
index 9861306bd777..6e3cab206e82 100644
--- a/scripts/test_list.py
+++ b/scripts/test_list.py
@@ -325,7 +325,8 @@ class TestList:
                 if sublevel_count[level - 1] == 1:
                     del item["_properties_"]["level"]
                     del item["_properties_"]["sublevel"]
-        del self.props["_properties_"]
+        if "_properties_" in self.props:
+            del self.props["_properties_"]
 
         has_implemented = False
         if not self.filenames:
-- 
2.40.1



More information about the igt-dev mailing list