mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-19 01:24:42 -05:00
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:
@@ -436,16 +436,16 @@ def dump_device_and_object_properties(conv, dumpprefix):
|
|||||||
if k not in ['name', 'type', 'description', 'default-value']:
|
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))
|
raise Exception("Unhandled 'device-list-properties'/'qom-list-properties' typename '%s' field '%s'" % (c['cmd']['arguments']['typename'], k))
|
||||||
|
|
||||||
if 'default-value' in arg:
|
if 'default-value' in arg:
|
||||||
defval = ' (%s)' % str(arg['default-value'])
|
defval = ' (%s)' % str(arg['default-value'])
|
||||||
else:
|
else:
|
||||||
defval = ''
|
defval = ''
|
||||||
|
|
||||||
ent.append('%s %s %s %s%s' % (prefix,
|
ent.append('%s %s %s %s%s' % (prefix,
|
||||||
c['cmd']['arguments']['typename'],
|
c['cmd']['arguments']['typename'],
|
||||||
arg['name'],
|
arg['name'],
|
||||||
arg['type'],
|
arg['type'],
|
||||||
defval))
|
defval))
|
||||||
ent.sort()
|
ent.sort()
|
||||||
|
|
||||||
for e in ent:
|
for e in ent:
|
||||||
|
|||||||
Reference in New Issue
Block a user