If printing a QAPI schema object for debugging we get the classname and a hex value for the instance. With this change we instead get the classname and the human friendly name of the QAPI type instance.
Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> --- scripts/qapi/schema.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index ff16578f6d..800bc5994b 100644 --- a/scripts/qapi/schema.py +++ b/scripts/qapi/schema.py @@ -46,6 +46,9 @@ def __init__(self, name: str, info, doc, ifcond=None, features=None): self.features = features or [] self._checked = False + def __repr__(self): + return "%s<%s>" % (type(self).__name__, self.name) + def c_name(self): return c_name(self.name) -- 2.29.2