[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] python/utils: add VerboseProcessError
From: |
Eric Blake |
Subject: |
Re: [PATCH 2/5] python/utils: add VerboseProcessError |
Date: |
Thu, 3 Mar 2022 20:41:38 -0600 |
User-agent: |
NeoMutt/20211029-378-f757a4 |
On Thu, Mar 03, 2022 at 03:58:59PM -0500, John Snow wrote:
> This adds an Exception that extends the Python stdlib
> subprocess.CalledProcessError.
>
> The difference is that the str() method of this exception also adds the
> stdout/stderr logs. In effect, if this exception goes unhandled, Python
> will print the output in a visually distinct wrapper to the terminal so
> that it's easy to spot in a sea of traceback information.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> python/qemu/utils/__init__.py | 36 +++++++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- [PATCH 0/5] iotests: add enhanced debugging info to qemu-img failures, John Snow, 2022/03/03
- [PATCH 1/5] python/utils: add add_visual_margin() text decoration utility, John Snow, 2022/03/03
- [PATCH 2/5] python/utils: add VerboseProcessError, John Snow, 2022/03/03
- Re: [PATCH 2/5] python/utils: add VerboseProcessError,
Eric Blake <=
- [PATCH 3/5] iotests: Remove explicit checks for qemu_img() == 0, John Snow, 2022/03/03
- [PATCH 4/5] iotests: make qemu_img raise on non-zero rc by default, John Snow, 2022/03/03
- [PATCH 5/5] iotests: fortify compare_images() against crashes, John Snow, 2022/03/03