From 0bfad122c2079350a254bb230d28838048cd1119 Mon Sep 17 00:00:00 2001 From: Jessica Castelino Date: Tue, 29 Nov 2022 20:25:40 +0000 Subject: [PATCH] Fix: Patch commit fails with Traceback This commit fixes patch commit for RR patches. Test Plan: [PASS] Commit a RR patch Closes-Bug: 1998251 Signed-off-by: Jessica Castelino Change-Id: Iee070a1cab5f3515c6324395fa837bb7a6aa42f9 --- sw-patch/cgcs-patch/cgcs_patch/patch_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw-patch/cgcs-patch/cgcs_patch/patch_controller.py b/sw-patch/cgcs-patch/cgcs_patch/patch_controller.py index a9a63337..52d85b21 100644 --- a/sw-patch/cgcs-patch/cgcs_patch/patch_controller.py +++ b/sw-patch/cgcs-patch/cgcs_patch/patch_controller.py @@ -1881,8 +1881,8 @@ class PatchController(PatchService): restart_script_path = "%s/%s" % \ (root_scripts_dir, self.patch_data.metadata[patch_id]["restart_script"]) - if os.path.exists(restart_script_path): - cleanup_files.add(restart_script_path) + if os.path.exists(restart_script_path): + cleanup_files.add(restart_script_path) patch_sw_version = self.patch_data.metadata[patch_id]["sw_version"] abs_ostree_tar_dir = package_dir[patch_sw_version] software_tar_path = "%s/%s-software.tar" % (abs_ostree_tar_dir, patch_id)