Merge bitcoin/bitcoin#33915: test: Retry download in get_previous_releases.py
fad06f3bb4test: retry download in get_previous_releases.py (MarcoFalke) Pull request description: Hopefully fixes https://github.com/bitcoin/bitcoin/issues/33913 (intermittent download issues) If not, the diff there to cache the bins can be considered. ACKs for top commit: davidgumberg: ACK https://github.com/bitcoin/bitcoin/pull/33915/commits/fad06f3bb436a97683e8248bfda1bd0d9998c899 achow101: ACKfad06f3bb4enirox001: ACKfad06f3TheCharlatan: ACKfad06f3bb4janb84: ACKfad06f3bb4Tree-SHA512: 6597e993cc64259e361f65045a938e693b47ff73a7dc22f5a70b6c9890986817849915f90096e3b87684f25152a6d8ae4ec5480c326c32d36273cdb0a33ceb0c
This commit is contained in:
1 file changed
+7
-1
@@ -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