Skip to content

Commit

Permalink
qapi/introspect.py: Unify return type of _make_tree()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jnsnow authored and Markus Armbruster committed Feb 18, 2021
1 parent 0555696 commit 84cf099
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/qapi/introspect.py
Expand Up @@ -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):
Expand Down

0 comments on commit 84cf099

Please sign in to comment.