mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
cpu-gather: Ignore empty responses from qemu
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
bbba6314b7
commit
e18546ed13
@ -93,8 +93,12 @@ def call_qemu(qemu, qmp_cmds):
|
||||
exit("Error: File not found: '{}'.".format(qemu))
|
||||
|
||||
for line in output.split("\n"):
|
||||
if line:
|
||||
yield json.loads(line)
|
||||
if not line:
|
||||
continue
|
||||
response = json.loads(line)
|
||||
if "return" in response and not response["return"]:
|
||||
continue
|
||||
yield response
|
||||
|
||||
|
||||
def gather_model(args):
|
||||
|
Loading…
x
Reference in New Issue
Block a user