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

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Jul 12 18:52:01 UTC 2023


Hi Mauro,
On 2023-07-12 at 15:58:51 +0200, Mauro Carvalho Chehab wrote:
> 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>

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

> ---
>  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