qapi/introspect.py: Unify return type of _make_tree()

Returning two different types conditionally can be complicated to
type. Return one type for consistency.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210216021809.134886-7-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
John Snow 2021-02-15 21:17:56 -05:00 committed by Markus Armbruster
parent 055569603d
commit 84cf09915f

View File

@ -29,9 +29,7 @@ def _make_tree(obj, ifcond, extra=None):
extra = {}
if ifcond:
extra['if'] = ifcond
if extra:
return (obj, extra)
return obj
return (obj, extra)
def _tree_to_qlit(obj, level=0, dict_value=False):