diff options
Diffstat (limited to 'scripts/qapi/introspect.py')
-rw-r--r-- | scripts/qapi/introspect.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py index db1ebbf53a..e23725e2f9 100644 --- a/scripts/qapi/introspect.py +++ b/scripts/qapi/introspect.py @@ -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 |