aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2021-02-15 21:17:56 -0500
committerMarkus Armbruster <armbru@redhat.com>2021-02-18 19:37:41 +0100
commit84cf09915fdaba38a5d5f21baff38e94dd98607f (patch)
treeb6c1b35d40c2876a67b279cb035ab371d77b9bfb /scripts
parent055569603d150a18e4d976bb58092206f5024814 (diff)
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qapi/introspect.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introspect.py
index a111cec725..7cce0de975 100644
--- a/scripts/qapi/introspect.py
+++ b/scripts/qapi/introspect.py
@@ -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):