mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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))
|
exit("Error: File not found: '{}'.".format(qemu))
|
||||||
|
|
||||||
for line in output.split("\n"):
|
for line in output.split("\n"):
|
||||||
if line:
|
if not line:
|
||||||
yield json.loads(line)
|
continue
|
||||||
|
response = json.loads(line)
|
||||||
|
if "return" in response and not response["return"]:
|
||||||
|
continue
|
||||||
|
yield response
|
||||||
|
|
||||||
|
|
||||||
def gather_model(args):
|
def gather_model(args):
|
||||||
|
Loading…
Reference in New Issue
Block a user