提交 6c2892f1 编写于 作者: X Xueqiang Wei

qemu.test: fix python3 compatibility issue

1. for case block_discard and physical_resources_check
Signed-off-by: NXueqiang Wei <xuwei@redhat.com>
上级 543b1e21
......@@ -32,7 +32,7 @@ def run(test, params, env):
"""
Get latest scsi disk which emulated by scsi_debug module.
"""
scsi_disk_info = process.system_output("lsscsi").splitlines()
scsi_disk_info = process.system_output("lsscsi").decode().splitlines()
scsi_debug = [_ for _ in scsi_disk_info if 'scsi_debug' in _][-1]
scsi_debug = scsi_debug.split()
host_id = scsi_debug[0][1:-1]
......
......@@ -175,8 +175,8 @@ def run(test, params, env):
test.error("Failed to get machine type from vm")
machine_type_cmd = "%s -M ?" % utils_misc.get_qemu_binary(params)
machine_types = process.system_output(machine_type_cmd,
ignore_status=True)
machine_types = process.system_output(
machine_type_cmd, ignore_status=True).decode()
machine_types = machine_types.split(':')[-1]
machine_type_map = {}
for machine_type in machine_types.splitlines():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册