From: Peter Krempa Date: Tue, 7 Oct 2025 09:42:41 +0000 (+0200) Subject: qemu-replies-tool: Fix logic error when dumping device properties X-Git-Tag: v11.9.0-rc1~92 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5bc43f95e506c4bab85d9953b52a9794187667c4;p=thirdparty%2Flibvirt.git qemu-replies-tool: Fix logic error when dumping device properties In a recent refactor the block of code outputting device properties was mis-indented causing it to only work on device properties which have no 'default-value'. Fixes: 301e1ba244f Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/scripts/qemu-replies-tool.py b/scripts/qemu-replies-tool.py index cf99ecd1f3..21401452cf 100755 --- a/scripts/qemu-replies-tool.py +++ b/scripts/qemu-replies-tool.py @@ -436,16 +436,16 @@ def dump_device_and_object_properties(conv, dumpprefix): if k not in ['name', 'type', 'description', 'default-value']: raise Exception("Unhandled 'device-list-properties'/'qom-list-properties' typename '%s' field '%s'" % (c['cmd']['arguments']['typename'], k)) - if 'default-value' in arg: - defval = ' (%s)' % str(arg['default-value']) - else: - defval = '' - - ent.append('%s %s %s %s%s' % (prefix, - c['cmd']['arguments']['typename'], - arg['name'], - arg['type'], - defval)) + if 'default-value' in arg: + defval = ' (%s)' % str(arg['default-value']) + else: + defval = '' + + ent.append('%s %s %s %s%s' % (prefix, + c['cmd']['arguments']['typename'], + arg['name'], + arg['type'], + defval)) ent.sort() for e in ent: