提交 a0bcdd20 编写于 作者: H Haotong Chen

Python 3: fix a process issue

porcess.system_output needs to set ignore_status=True
and decode the return value for later usage.
Signed-off-by: NHaotong Chen <hachen@redhat.com>
上级 d049472b
......@@ -54,9 +54,10 @@ def run(test, params, env):
assign_vm_into_cgroup(vm, cgroup, 0)
vhost_pids = process.system_output("pidof vhost-%s" % vm.get_pid(),
shell=True)
shell=True,
ignore_status=True).decode()
if not vhost_pids:
test.error("Vhost process not exise")
test.error("Vhost process does not exist")
logging.info("Vhost have started with pid %s" % vhost_pids)
for vhost_pid in vhost_pids.strip().split():
cgroup.set_cgroup(int(vhost_pid))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册