diff options
author | John Snow | 2021-02-16 03:17:56 +0100 |
---|---|---|
committer | Markus Armbruster | 2021-02-18 19:37:41 +0100 |
commit | 84cf09915fdaba38a5d5f21baff38e94dd98607f (patch) | |
tree | b6c1b35d40c2876a67b279cb035ab371d77b9bfb /scripts/qapi/introspect.py | |
parent | qapi/introspect.py: guard against ifcond/comment misuse (diff) | |
download | qemu-84cf09915fdaba38a5d5f21baff38e94dd98607f.tar.gz qemu-84cf09915fdaba38a5d5f21baff38e94dd98607f.tar.xz qemu-84cf09915fdaba38a5d5f21baff38e94dd98607f.zip |
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/qapi/introspect.py')
-rw-r--r-- | scripts/qapi/introspect.py | 4 |
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): |