]> Git Repo - qemu.git/commitdiff
qapi/introspect.py: improve _tree_to_qlit error message
authorJohn Snow <[email protected]>
Tue, 16 Feb 2021 02:18:01 +0000 (21:18 -0500)
committerMarkus Armbruster <[email protected]>
Thu, 18 Feb 2021 18:45:20 +0000 (19:45 +0100)
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 <[email protected]>
Message-Id: <20210216021809[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
scripts/qapi/introspect.py

index 715220afe7d41006b248b42fec69c4483fb135dc..96dfbb4cefafdc3471ffb9fc36f39a09bd8d17f7 100644 (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
This page took 0.023462 seconds and 4 git commands to generate.