From 08f585795b0e2e5cc410dd9366102a36c69d5f5f Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Fri, 3 Feb 2023 11:55:55 +0100 Subject: [PATCH] annotations: fix _remove_entry() logic Drop unnecessary delete statements and fix the code to properly remove the entry in _remove_entry(). Reported-by: Juerg Haefliger Signed-off-by: Andrea Righi --- kconfig/annotations.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kconfig/annotations.py b/kconfig/annotations.py index 3eb2c07..df3bf11 100644 --- a/kconfig/annotations.py +++ b/kconfig/annotations.py @@ -120,11 +120,7 @@ class Annotation(Config): self._parse_body(data) def _remove_entry(self, config : str): - if 'policy' in self.config[config]: - del self.config[config]['policy'] - if 'note' in self.config[config]: - del self.config[config]['note'] - if not self.config[config]: + if self.config[config]: del self.config[config] def remove(self, config : str, arch: str = None, flavour: str = None): -- 2.31.1