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: 301e1ba244
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa
2025-10-08 09:24:26 +02:00
parent 076545ef27
commit 5bc43f95e5
+9 -9
View File
@@ -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 = ''
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.append('%s %s %s %s%s' % (prefix,
c['cmd']['arguments']['typename'],
arg['name'],
arg['type'],
defval))
ent.sort()
for e in ent: