From: Andrea Righi Date: Fri, 3 Feb 2023 10:55:55 +0000 (+0100) Subject: annotations: fix _remove_entry() logic X-Git-Tag: v0.1~36 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=08f585795b0e2e5cc410dd9366102a36c69d5f5f;p=annotations.git 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 --- 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):