[igt-dev] [PATCH i-g-t v3 10/14] scripts/test_list.py: add a check before deleting properties
Mauro Carvalho Chehab
mauro.chehab at linux.intel.com
Thu Jul 13 07:50:50 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 27434a6d7471..a9b0dffaf8d5 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