mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
tests/functional/asset: Fail assert fetch when retries are exceeded
Currently the fetch code does not fail gracefully when retry limit is exceeded, it just falls through the loop with no file, which ends up hitting other errors. Add a check for non-existing file, which indicates the retry limit was exceeded. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Message-ID: <20250312130002.945508-2-npiggin@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
15ef93dd48
commit
a5e8299d1a
1 changed files with 3 additions and 0 deletions
|
@ -138,6 +138,9 @@ class Asset:
|
|||
tmp_cache_file.unlink()
|
||||
raise
|
||||
|
||||
if not os.path.exists(tmp_cache_file):
|
||||
raise Exception("Retries exceeded downloading %s", self.url)
|
||||
|
||||
try:
|
||||
# Set these just for informational purposes
|
||||
os.setxattr(str(tmp_cache_file), "user.qemu-asset-url",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue