qapi/introspect.py: improve _tree_to_qlit error message

Trivial; make the error message just a pinch more explicit in case we
trip this by accident in the future.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210216021809.134886-12-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
John Snow 2021-02-15 21:18:01 -05:00 committed by Markus Armbruster
parent 4f7f97a7b3
commit 2a6c161bbf
1 changed files with 3 additions and 1 deletions

View File

@ -126,7 +126,9 @@ def _tree_to_qlit(obj, level=0, dict_value=False):
elif isinstance(obj, bool):
ret += 'QLIT_QBOOL(%s)' % ('true' if obj else 'false')
else:
assert False # not implemented
raise NotImplementedError(
f"type '{type(obj).__name__}' not implemented"
)
if level > 0:
ret += ','
return ret