From eed4b08bedd80f8b52b7bd6bffdc361dcc696de8 Mon Sep 17 00:00:00 2001 From: hyokeun Date: Wed, 14 Jun 2017 08:02:50 +0900 Subject: [PATCH] REF: Check existence of package before delete Change-Id: Ide843947ac54b0f93fd3ad60463f4a30ec64ba62 --- job_ref_create_prj_obs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/job_ref_create_prj_obs.py b/job_ref_create_prj_obs.py index 029cae6..8a39bd7 100644 --- a/job_ref_create_prj_obs.py +++ b/job_ref_create_prj_obs.py @@ -588,7 +588,8 @@ class ref_create_project_obs(object): print " 2) remove package %s" %(packages) for pkgname in packages: del todo_dict[pkgname] - build.delete_package(target, pkgname) + if build.exists(target, pkgname): + build.delete_package(target, pkgname) packages = self.remove_duplicates(remote_package_list, package_list) print "\n********" @@ -692,7 +693,8 @@ class ref_create_project_obs(object): print " 2) remove package %s" %(packages) for pkgname in packages: del todo_dict[pkgname] - build.delete_package(target, pkgname) + if build.exists(target, pkgname): + build.delete_package(target, pkgname) packages = self.remove_duplicates(remote_package_list, package_list) print "\n********" -- 2.7.4