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é <[email protected]>
---
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 <[email protected]>