[NonACR][inst.py][Updated inst.py script] 02/204602/1
authorSanghoon Lee <shooney.lee@samsung.com>
Thu, 25 Apr 2019 01:25:38 +0000 (10:25 +0900)
committerSanghoon Lee <shooney.lee@samsung.com>
Thu, 25 Apr 2019 01:25:38 +0000 (10:25 +0900)
Change-Id: I16091cac589743bfe8d8e214dce245f1d6b8502c

tool/script/template/inst.py

index b6c2afa..3f275d5 100755 (executable)
@@ -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)):