From 82d666f0e3e1dc9e4f351f16826c1ee9505ceff2 Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Fri, 3 Feb 2023 11:53:32 +0100 Subject: [PATCH] UBUNTU: [Packaging]: 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 --- debian/scripts/misc/kconfig/annotations.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/debian/scripts/misc/kconfig/annotations.py b/debian/scripts/misc/kconfig/annotations.py index 3eb2c078c097..df3bf11e7320 100644 --- a/debian/scripts/misc/kconfig/annotations.py +++ b/debian/scripts/misc/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):