From 01fd4df78c5100edfaae21f844325beae21bbf27 Mon Sep 17 00:00:00 2001 From: Sanghoon Lee Date: Thu, 25 Apr 2019 10:25:38 +0900 Subject: [PATCH] [NonACR][inst.py][Updated inst.py script] Change-Id: I16091cac589743bfe8d8e214dce245f1d6b8502c --- tool/script/template/inst.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tool/script/template/inst.py b/tool/script/template/inst.py index b6c2afa..3f275d5 100755 --- a/tool/script/template/inst.py +++ b/tool/script/template/inst.py @@ -123,13 +123,15 @@ def uninstPKGs(): for root, dirs, files in os.walk(SCRIPT_DIR): print "uninstPKGs ################################" for file in files: - print ("file : " + file) + print ("file : %s" % (file)) if file.endswith(".wgt"): pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0])) - print ("pkg_id wgt : " + pkg_id) if not pkg_id: action_status = False + print ("pkg_id wgt is None") continue + + print ("pkg_id wgt : %s" % (pkg_id)) (return_code, output) = doRemoteCMD( "pkgcmd -u -t wgt -q -n %s" % pkg_id) for line in output: @@ -138,12 +140,15 @@ def uninstPKGs(): break elif file.endswith(".tpk"): pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0])) - print ("tpk pkg_id : " + pkg_id) if not pkg_id: + print ("tpk pkg_id is None") action_status = False continue + + print ("tpk pkg_id : %s" % (pkg_id)) (return_code, output) = doRemoteCMD( "pkgcmd -u -t tpk -q -n %s" % pkg_id) + for line in output: if "Failure" in line: action_status = False @@ -166,7 +171,7 @@ def askpolicyremoving(): elif file.endswith(".tpk"): pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0])) - print "pkg_id :" + pkg_id + print ("pkg_id : %s" % (pkg_id)) print (os.getcwd()) print (os.path.dirname(os.path.realpath(__file__)) ) if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)): -- 2.7.4