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']:
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user