From 65fafcf1466190e6ce223f716430fd61266c4188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Alexandroni=20Cordova=20de=20Sousa?= Date: Tue, 17 Aug 2021 11:13:48 -0300 Subject: [PATCH] First system load-delete failed after upgrade SX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The load-delete function calls sw-patch del-release function that tries to delete a 'version' key from a dictionary that does not exists. This dictionary is populated looping the folders inside /www/pages/feed. Each folder is a version imported. After the upgrade the old version folder is deleted, the version is not include at the dictionary. The solution was to verify if this key exists before deleting. The following tests Tested load-delete action on a SX system after load-import Tested load-delete action on a SX system after upgrade-complete Closes-Bug: 1940302 Signed-off-by: João Pedro Alexandroni Cordova de Sousa Change-Id: I83f8d144edd53523a98402fbee71dce1507fc79c --- cgcs-patch/cgcs-patch/cgcs_patch/patch_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgcs-patch/cgcs-patch/cgcs_patch/patch_controller.py b/cgcs-patch/cgcs-patch/cgcs_patch/patch_controller.py index c84bcdfa..34c5be12 100644 --- a/cgcs-patch/cgcs-patch/cgcs_patch/patch_controller.py +++ b/cgcs-patch/cgcs-patch/cgcs_patch/patch_controller.py @@ -1645,7 +1645,7 @@ class PatchController(PatchService): del repo_dir[release] - if self.base_pkgdata is not None: + if self.base_pkgdata is not None and release in self.base_pkgdata.pkgs: del self.base_pkgdata.pkgs[release] # Refresh patch data