mirror of
https://github.com/xemu-project/xemu.git
synced 2025-02-08 21:28:13 +00:00
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:
parent
055569603d
commit
84cf09915f
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user