On Wed, Sep 03, 2025 at 01:11:07AM -0400, John Snow wrote:
> 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 <js...@redhat.com>
> cherry picked from commit afdb7893f3b34212da4259b7202973f9a8cb85b3

Wonder if we should modify this (and later commits) to say:

 cherry picked from commit 
python-qemu-qmp@afdb7893f3b34212da4259b7202973f9a8cb85b3

to avoid the ambiguity of what repo we're referring to

> ---
>  python/qemu/qmp/error.py      |  7 +++++--
>  python/qemu/qmp/message.py    | 12 ++++++------
>  python/qemu/qmp/protocol.py   |  7 +++++--
>  python/qemu/qmp/qmp_client.py | 20 +++++++++++++-------
>  4 files changed, 29 insertions(+), 17 deletions(-)

Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Reply via email to