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 <juerg.haefliger@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
Andrea Righi
2023-02-03 11:53:32 +01:00
committed by Paolo Pisati
parent e5fcf54ed7
commit 82d666f0e3
+1 -5
View File
@@ -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):