[igt-dev] [PATCH i-g-t v4 06/11] scripts/test_list.py: add a check before deleting properties

Mauro Carvalho Chehab mauro.chehab at linux.intel.com
Thu Aug 31 14:52:08 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.

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
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 9ab33f15d970..753ec91206cd 100755
--- a/scripts/test_list.py
+++ b/scripts/test_list.py
@@ -305,7 +305,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.41.0



More information about the igt-dev mailing list