From: Tim Wiederhake Date: Tue, 15 Dec 2020 16:25:10 +0000 (+0100) Subject: cpu-gather: Ignore empty responses from qemu X-Git-Tag: v7.0.0-rc1~146 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e18546ed13bc03d29a6ec57ca72844715b5f679f;p=thirdparty%2Flibvirt.git cpu-gather: Ignore empty responses from qemu Signed-off-by: Tim Wiederhake Reviewed-by: Michal Privoznik --- diff --git a/tests/cputestdata/cpu-gather.py b/tests/cputestdata/cpu-gather.py index b6acae9eb7..10dbeb87cf 100755 --- a/tests/cputestdata/cpu-gather.py +++ b/tests/cputestdata/cpu-gather.py @@ -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):