mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-30 22:03:54 -06:00
qapi: add QAPISchemaIfCond.is_present()
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20210804083105.97531-4-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
f17539c80d
commit
33aa3267ba
4 changed files with 12 additions and 9 deletions
|
@ -123,10 +123,10 @@ def _tree_to_qlit(obj: JSONValue,
|
|||
ret = ''
|
||||
if obj.comment:
|
||||
ret += indent(level) + f"/* {obj.comment} */\n"
|
||||
if obj.ifcond.ifcond:
|
||||
if obj.ifcond.is_present():
|
||||
ret += gen_if(obj.ifcond.ifcond)
|
||||
ret += _tree_to_qlit(obj.value, level)
|
||||
if obj.ifcond.ifcond:
|
||||
if obj.ifcond.is_present():
|
||||
ret += '\n' + gen_endif(obj.ifcond.ifcond)
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue