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 <jessica.castelino@windriver.com>
Change-Id: Iee070a1cab5f3515c6324395fa837bb7a6aa42f9
This commit is contained in:
Jessica Castelino 2022-11-29 20:25:40 +00:00
parent 61a4343b73
commit 0bfad122c2
1 changed files with 2 additions and 2 deletions

View File

@ -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)