qemu-cr16/python/qemu/qmp
John Snow 2d26741fc5 python: backport 'Change error classes to have better repr methods'
By passing all of the arguments to the base class and overriding the
__str__ method when we want a different "human readable" message that
isn't just printing the list of arguments, we can ensure that all custom
error classes have a reasonable __repr__ implementation.

In the case of ExecuteError, the pseudo-field that isn't actually
correlated to an input argument can be re-imagined as a read-only
property; this forces consistency in the class and makes the repr output
more obviously correct.

Signed-off-by: John Snow <jsnow@redhat.com>
cherry picked from commit python-qemu-qmp@afdb7893f3b34212da4259b7202973f9a8cb85b3
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2025-09-15 14:36:01 -04:00
..
__init__.py python: rename qemu.aqmp to qemu.qmp 2022-04-21 11:01:00 -04:00
error.py python: backport 'Change error classes to have better repr methods' 2025-09-15 14:36:01 -04:00
events.py python: rename qemu.aqmp to qemu.qmp 2022-04-21 11:01:00 -04:00
legacy.py python/qemu: rename command() to cmd() 2023-10-12 14:21:43 -04:00
message.py python: backport 'Change error classes to have better repr methods' 2025-09-15 14:36:01 -04:00
models.py docs/interop: Convert qmp-spec.txt to rST 2023-05-22 10:21:01 +02:00
protocol.py python: backport 'Change error classes to have better repr methods' 2025-09-15 14:36:01 -04:00
py.typed python: rename qemu.aqmp to qemu.qmp 2022-04-21 11:01:00 -04:00
qmp_client.py python: backport 'Change error classes to have better repr methods' 2025-09-15 14:36:01 -04:00
qmp_shell.py python/qemu: rename command() to cmd() 2023-10-12 14:21:43 -04:00
qmp_tui.py python: bump minimum requirements so they are compatible with 3.12 2023-07-07 12:49:22 +02:00
util.py python: update for mypy 0.950 2022-06-06 09:26:54 +02:00