qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: [PATCH 2/3] tests/functional: fix formatting of exception args
Date: Fri, 29 Aug 2025 10:52:13 +0200	[thread overview]
Message-ID: <d0195bfe-2a17-4020-8176-8f2219f1951b@redhat.com> (raw)
In-Reply-To: <20250829083156.2570137-3-berrange@redhat.com>

On 29/08/2025 10.31, Daniel P. Berrangé wrote:
> On HTTP 404 errors, we failed to include the URL in the exception
> that was raised, while for the catch-all exception we failed to
> include the URL and forgot the placeholder for the exception
> details too.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   tests/functional/qemu_test/asset.py | 7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_test/asset.py
> index b5a6136d36..ae2bec3ea5 100644
> --- a/tests/functional/qemu_test/asset.py
> +++ b/tests/functional/qemu_test/asset.py
> @@ -168,12 +168,13 @@ def fetch(self):
>                   # indicate a broken test rather than a transient
>                   # server or networking problem
>                   if e.code == 404:
> -                    raise AssetError(self, "Unable to download: "
> -                                     "HTTP error %d" % e.code)
> +                    raise AssetError(self, "Unable to download %s: "
> +                                     "HTTP error %d" % (self.url, e.code))
>                   continue
>               except Exception as e:
>                   tmp_cache_file.unlink()
> -                raise AssetError(self, "Unable to download: " % e)
> +                raise AssetError(self, "Unable to download %s: %s" % (
> +                    self.url, e))
>   
>           if not os.path.exists(tmp_cache_file):
>               raise AssetError(self, "Download retries exceeded", transient=True)

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2025-08-30 15:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-29  8:31 [PATCH 0/3] tests/functional: improve handling flaky downloads Daniel P. Berrangé
2025-08-29  8:31 ` [PATCH 1/3] tests/functional: enable force refresh of cached assets Daniel P. Berrangé
2025-08-29  8:50   ` Thomas Huth
2025-08-29  9:04     ` Daniel P. Berrangé
2025-08-29  9:21       ` Thomas Huth
2025-08-29  8:31 ` [PATCH 2/3] tests/functional: fix formatting of exception args Daniel P. Berrangé
2025-08-29  8:52   ` Thomas Huth [this message]
2025-08-29  8:31 ` [PATCH 3/3] tests/functional: handle URLError when fetching assets Daniel P. Berrangé
2025-08-29  9:00   ` Thomas Huth
2025-08-29  9:08     ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d0195bfe-2a17-4020-8176-8f2219f1951b@redhat.com \
    --to=thuth@redhat.com \
    --cc=berrange@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).