qapi/introspect.py: add _gen_features helper
commit84bece7dd4ce7ca5a36bc996452ebc882f59ae54
authorJohn Snow <jsnow@redhat.com>
Tue, 16 Feb 2021 02:17:54 +0000 (15 21:17 -0500)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 18 Feb 2021 18:37:20 +0000 (18 19:37 +0100)
treef6a44f2f9049c6f57cb5dd58cfdcd49b32657eb9
parentd70f5130f6779042f43d315a9bf2dd182e4708c7
qapi/introspect.py: add _gen_features helper

_make_tree might receive a dict (a SchemaInfo object) or some other type
(usually, a string) for its obj parameter. Adding features information
should arguably be performed by the caller at such a time when we know
the type of the object and don't have to re-interrogate it.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210216021809.134886-5-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi/introspect.py