mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
test: retry download in get_previous_releases.py
This commit is contained in:
@@ -168,7 +168,13 @@ def download_binary(tag, args) -> int:
|
|||||||
download_from_url(archive_url, archive)
|
download_from_url(archive_url, archive)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"\nDownload failed: {e}", file=sys.stderr)
|
print(f"\nDownload failed: {e}", file=sys.stderr)
|
||||||
return 1
|
print("Retrying download after failure ...", file=sys.stderr)
|
||||||
|
time.sleep(12)
|
||||||
|
try:
|
||||||
|
download_from_url(archive_url, archive)
|
||||||
|
except Exception as e2:
|
||||||
|
print(f"\nDownload failed a second time: {e2}", file=sys.stderr)
|
||||||
|
return 1
|
||||||
|
|
||||||
hasher = hashlib.sha256()
|
hasher = hashlib.sha256()
|
||||||
with open(archive, "rb") as afile:
|
with open(archive, "rb") as afile:
|
||||||
|
|||||||
Reference in New Issue
Block a user