def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import logging
import Queue
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
from shellmanager import ShellManager
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
USER_DIR = tct_parser.get('DEVICE', 'DEVICE_USER_30')
shell_mgr.write_cmd('export `tzplatform-get --user ' +PARAMETERS.user+' TZ_USER_CONTENT`', '', None)
INTERNAL_STORAGE=shell_mgr.write_cmd('echo $TZ_USER_CONTENT','', None)
INTERNAL_STORAGE=str(INTERNAL_STORAGE[len(INTERNAL_STORAGE)-1])
- print (str(INTERNAL_STORAGE))
+ print str(INTERNAL_STORAGE)
except Exception as ex:
- print (ex)
+ print ex
finally:
shell_mgr.close_shellpipe()
# PARAMETERS.device)
# return doCMD(cmd)
# except Exception as ex:
-# print (ex)
+# print ex
# else:
# print ("aaaaaaaaaaaaaaa")
# os.system(
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import logging
import Queue
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
from shellmanager import ShellManager
time.sleep(3)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
#INTERNAL_STORAGE = tct_parser.get('DEVICE', 'DEVICE_STORAGE_30')
shell_mgr.write_cmd('export `tzplatform-get --user ' +PARAMETERS.user+' TZ_USER_CONTENT`', '', None)
INTERNAL_STORAGE=shell_mgr.write_cmd('echo $TZ_USER_CONTENT','', None)
INTERNAL_STORAGE=str(INTERNAL_STORAGE[len(INTERNAL_STORAGE)-1])
- print (str(INTERNAL_STORAGE))
+ print str(INTERNAL_STORAGE)
except Exception as ex:
- print (ex)
+ print ex
finally:
shell_mgr.close_shellpipe()
def askpolicyremoving():
+ print "0"
+ print "0"
+ print "0"
+ print "0"
+ print "0"
for root, dirs, files in os.walk(SCRIPT_DIR):
for file in files:
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
+ print pkg_id
+ print pkg_id
+ print pkg_id
print (os.getcwd())
+ print (os.getcwd())
+ print (os.path.dirname(os.path.realpath(__file__)) )
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
action_status = False
+ print "1"
+ print "1"
+ print "1"
+ print "1"
+ print "1"
if PARAMETERS.mode == "SDB":
cmd = "sdb -s %s shell .%s/askpolicy.sh %s" % (PARAMETERS.device,
SRC_DIR, pkg_id)
- return doCMD(cmd)
+ print cmd
+ print cmd
+ print cmd
+ print cmd
+ print cmd
+ return doCMD(cmd)
+ print "2"
+ print "2"
+ print "2"
def recordInternalStorage():
try:
PARAMETERS.device)
return doCMD(cmd)
except Exception as ex:
- print (ex)
+ print ex
else:
print ("aaaaaaaaaaaaaaa")
# os.system(
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
action_status = False
break
print(INTERNAL_STORAGE)
+ print(INTERNAL_STORAGE)
+ print(INTERNAL_STORAGE)
if not doRemoteCopy("%s/media" % SCRIPT_DIR, "%s/%s" % (SRC_DIR, PKG_NAME)):
action_status = False
if not doRemoteCopy("%s/media" % SCRIPT_DIR, "%s/Downloads/" % (INTERNAL_STORAGE)):
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
sys.exit(1)
else:
if not instPKGs():
+ print "inst"
+ print "inst"
+ print "inst"
+ print "inst"
+ print "inst"
#askpolicyremoving()
sys.exit(1)
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import logging
import Queue
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
from shellmanager import ShellManager
time.sleep(3)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
shell_mgr.write_cmd('export `tzplatform-get --user ' +PARAMETERS.user+' TZ_USER_CONTENT`', '', None)
INTERNAL_STORAGE=shell_mgr.write_cmd('echo $TZ_USER_CONTENT','', None)
INTERNAL_STORAGE=str(INTERNAL_STORAGE[len(INTERNAL_STORAGE)-1])
- print (str(INTERNAL_STORAGE))
+ print str(INTERNAL_STORAGE)
except Exception as ex:
- print (ex)
+ print ex
finally:
shell_mgr.close_shellpipe()
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
+ print "1"
getInternalStorage()
- user_info = getUSERID()
+ print "2"
+ user_info = getUSERID()
+ print "3"
re_code = user_info[0]
if re_code == 0 :
global XW_ENV
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
<expected>TC is running</expected>
</step>
<step order="2">
- <step_desc>Click the "power" button or switch to a different application and then return to the test application.</step_desc>
+ <step_desc>Click the "power" button or switch to a different application and then return to the test application.</step_desc>
<expected>TC is pass</expected>
</step>
</steps>
<expected>TC is running</expected>
</step>
<step order="2">
- <step_desc>Click the "power" button or switch to a different application and then return to the test application.</step_desc>
+ <step_desc>Click the "power" button or switch to a different application and then return to the test application.</step_desc>
<expected>TC is pass</expected>
</step>
</steps>
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
GLOVAL_OPT="--global"
else:
GLOVAL_OPT=""
-
+
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
return doCMD(cmd)
+
+
def getPKGID(pkg_name=None):
if PARAMETERS.mode == "SDB":
cmd = "sdb -s %s shell %s" % (
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
else:
GLOVAL_OPT=""
-
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
return doCMD(cmd)
+
+
def getPKGID(pkg_name=None):
if PARAMETERS.mode == "SDB":
cmd = "sdb -s %s shell %s" % (
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import time
import sys
import subprocess
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
import string
-from optparse import OptionParser, make_option
-import configparser
+from optparse import OptionParser, make_option\r
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import os
import sys
import re
-import subprocess
+import commands
import glob
import fnmatch
import string
def iterfindfiles (path, fnexp):
for root, dirs, files in os.walk(path):
- for filename in fnmatch.filter(files, fnexp):
- yield os.path.join(root, filename)
+ for filename in fnmatch.filter(files, fnexp):
+ yield os.path.join(root, filename)
def count_upstream (string = None, str_entry=None ):
if string.find('/%s/' % str_entry) >= 0:
p3_auto_webdriver += 1*subcase
else:
p3_manual += 1*subcase
- except Exception as e:
- print ("Got error when analy test files: %s" % e)
- print (file_path)
+ except Exception, e:
+ print "Got error when analy test files: %s" % e
+ print file_path
p0_number = p0_auto + p0_manual
p1_number = p1_auto + p1_manual
n_upstream += 1
if element not in exist_upstream :
exist_upstream.append(element)
- except Exception as e:
- print (e)
+ except Exception, e:
+ print e
upstream = ""
for element in exist_upstream:
fp.write(content)
fp.write("\n")
fp.close()
- except Exception as e:
- print ("Got error when get case status: %s" % e)
+ except Exception, e:
+ print "Got error when get case status: %s" % e
def init_result_file():
title = "Suite_name,Total,Total_auto,Total_auto_webdriver,Total_manual,P0,P0_auto,P0_auto_webdriver,P0_manual,P1,P1_auto,\
fp.write(title)
fp.write("\n")
fp.close()
- except Exception as e:
- print ("Got error when init analy file : %s" % e)
+ except Exception, e:
+ print "Got error when init analy file : %s" % e
def main():
try:
init_result_file()
if len(sys.argv) == 1:
- sys.argv.append("-h")
+ sys.argv.append("-h")
(PARAMETERS, args) = opts_parser.parse_args()
if PARAMETERS.suitesdir:
for filename in iterfindfiles("%s" % PARAMETERS.suitesdir, "tests.full.xml"):
if PARAMETERS.xmlfile:
get_case_status(PARAMETERS.xmlfile)
except Exception as e:
- print ("Got error: %s, exit" % e)
+ print "Got error: %s, exit" % e
if __name__ == '__main__':
- main()
+ main()
def csv2full(csv_path, split_sign):
if not os.path.isfile(csv_path):
- print ('%s is not a file' % csv_path)
+ print '%s is not a file' % csv_path
return
name, ext = os.path.splitext(csv_path)
if not ext == '.csv':
- print ('%s is not a csv' % csv_path)
+ print '%s is not a csv' % csv_path
return
LOG.info("+Convert csv to xml start ...")
csv_file = file(csv_path, 'rb')
This function will print the user guide and stop toolkit.
"""
about = 'csv2xml V1.0\n-c <path> | Convert csv file to tests.full.xml and tests.xml\n'
- print (about)
+ print about
sys.exit()
def main():
elif sys_name == 'Linux':
split_sign = '/'
if len(sys.argv) != 3:
- print ('Error: No enough argv!')
+ print 'Error: No enough argv!'
echo_about()
else:
{'-c': lambda : csv2full(sys.argv[2], split_sign)}[sys.argv[1]]()
def xml2csv(xml_path, split_sign):
if not os.path.isfile(xml_path):
- print ('%s is not a file' % xml_path)
+ print '%s is not a file' % xml_path
return
name, ext = os.path.splitext(xml_path)
if not ext == '.xml':
- print ('%s is not a xml' % xml_path)
+ print '%s is not a xml' % xml_path
return
if not name.split(split_sign)[-1] == 'tests.full':
- print (name)
- print ('%s is not tests.full.xml' % xml_path)
+ print name
+ print '%s is not tests.full.xml' % xml_path
return
LOG.info("+Convert xml to csv start ...")
folder = os.path.dirname(xml_path)
This function will print the user guide and stop toolkit.
"""
about = 'xml2csv V1.0\n-c <path> | Convert tests.full.xml to csv file\n'
- print (about)
+ print about
sys.exit()
def main():
elif sys_name == 'Linux':
split_sign = '/'
if len(sys.argv) != 3:
- print ('Error: No enough argv!')
+ print 'Error: No enough argv!'
echo_about()
else:
{
else:
name, ext = os.path.splitext(xml_dir)
if not ext == '.xml':
- print ('%s is not a xml' % xml_path)
+ print '%s is not a xml' % xml_path
return
else:
verify_path(xml_dir, split_sign)
This function will print the user guide and stop toolkit.
"""
about = 'xmlverifier V1.0\n-v <path> | Verify case path, id, purpose and set type are right\n'
- print (about)
+ print about
sys.exit()
def main():
elif sys_name == 'Linux':
split_sign = '/'
if len(sys.argv) != 3:
- print ('Error: No enough argv!')
+ print 'Error: No enough argv!'
echo_about()
else:
{'-v': lambda : verify_xml(sys.argv[2], split_sign)}[sys.argv[1]]()
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
if file.endswith(".wgt"):
pkg_id = getPKGID(os.path.basename(os.path.splitext(file)[0]))
- print (pkg_id)
+ print pkg_id
print (os.getcwd())
print (os.path.dirname(os.path.realpath(__file__)) )
if not doRemoteCopy("%s/askpolicy.sh" % SCRIPT_DIR, "%s" % (SRC_DIR)):
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir:
import sys
import subprocess
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-u", dest="buninstpkg", action="store_true", help="Uninstall package")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.device:
break
if not PARAMETERS.device:
- print ("No device found")
+ print "No device found"
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
userCheck()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import subprocess
import string
from optparse import OptionParser, make_option\r
-import configparser
+import ConfigParser
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/5000/dbus/user_bus_socket"
TCT_CONFIG_FILE = "/opt/tools/TCT_CONFIG"
-tct_parser = configparser.ConfigParser()
+tct_parser = ConfigParser.ConfigParser()
tct_parser.read(TCT_CONFIG_FILE)
SRC_DIR = tct_parser.get('DEVICE', 'DEVICE_SUITE_TARGET_30')
PKG_SRC_DIR = "%s/tct/opt/%s" % (SRC_DIR, PKG_NAME)
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool do it
- print ("-->> \"%s\"" % cmd)
+ print "-->> \"%s\"" % cmd
output = []
cmd_return_code = 1
cmd_proc = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
if output_line == '' and cmd_return_code != None:
break
"-a", dest="user", action="store", help="User name")
global PARAMETERS
(PARAMETERS, args) = opts_parser.parse_args()
- except Exception as e:
- print ("Got wrong option: %s, exit ..." % e)
+ except Exception, e:
+ print "Got wrong option: %s, exit ..." % e
sys.exit(1)
if not PARAMETERS.user:
PARAMETERS.mode = "SSH"
if not PARAMETERS.device:
- print ("No device provided")
+ print "No device provided"
sys.exit(1)
user_info = getUSERID()
userid = user_info[1][0]
XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%s/dbus/user_bus_socket"%str(userid)
else:
- print ("[Error] cmd commands error : %s" % str(user_info[1]))
+ print "[Error] cmd commands error : %s"%str(user_info[1])
sys.exit(1)
if PARAMETERS.binstpkg and PARAMETERS.buninstpkg:
- print ("-i and -u are conflict")
+ print "-i and -u are conflict"
sys.exit(1)
if PARAMETERS.buninstpkg:
import zipfile
import signal
import subprocess
-import imp
from optparse import OptionParser
-imp.reload(sys)
+reload(sys)
+sys.setdefaultencoding('utf8')
TOOL_VERSION = "v0.1"
VERSION_FILE = "VERSION"
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
while True:
- output_line = cmd_proc.stdout.readline().decode("UTF-8").strip("\r\n")
+ output_line = cmd_proc.stdout.readline().strip("\r\n")
cmd_return_code = cmd_proc.poll()
elapsed_time = time.time() - pre_time
if cmd_return_code is None:
sys.exit(1)
if BUILD_PARAMETERS.bversion:
- LOG.info("Version: %s" % TOOL_VERSION)
+ print "Version: %s" % TOOL_VERSION
sys.exit(0)
if not BUILD_PARAMETERS.srcdir: