stdout=subprocess.PIPE, shell=shell)
out = proc.communicate()[0]
ret = proc.returncode
- return ret, out
+ return ret, out.decode()
else:
return self.host.execute(cmd_array)
stdout=subprocess.PIPE, shell=shell)
out = proc.communicate()[0]
ret = proc.returncode
- return ret, out
+ return ret, out.decode()
else:
return self.host.execute(cmd_array)
logger.debug("status: " + str(status))
logger.debug("buf: " + str(buf))
- return status, buf
+ return status, buf.decode()
def execute(self, command):
if self.host is None:
logger.debug(self.name + " status: " + str(status))
logger.debug(self.name + " buf: " + str(buf))
- return status, buf
+ return status, buf.decode()
# async execute
def execute_run(self, command, res):
stdout=subprocess.PIPE, shell=shell)
out = proc.communicate()[0]
ret = proc.returncode
- return ret, out
+ return ret, out.decode()
else:
return self.host.execute(cmd_array)