Skip to content

Commit 313cdd2

Browse files
committed
Merge bitcoin/bitcoin#33915: test: Retry download in get_previous_releases.py
fad06f3 test: retry download in get_previous_releases.py (MarcoFalke) Pull request description: Hopefully fixes bitcoin/bitcoin#33913 (intermittent download issues) If not, the diff there to cache the bins can be considered. ACKs for top commit: davidgumberg: ACK bitcoin/bitcoin@fad06f3 achow101: ACK fad06f3 enirox001: ACK fad06f3 TheCharlatan: ACK fad06f3 janb84: ACK fad06f3 Tree-SHA512: 6597e993cc64259e361f65045a938e693b47ff73a7dc22f5a70b6c9890986817849915f90096e3b87684f25152a6d8ae4ec5480c326c32d36273cdb0a33ceb0c
2 parents 17072f7 + fad06f3 commit 313cdd2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

test/get_previous_releases.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,13 @@ def download_binary(tag, args) -> int:
168168
download_from_url(archive_url, archive)
169169
except Exception as e:
170170
print(f"\nDownload failed: {e}", file=sys.stderr)
171-
return 1
171+
print("Retrying download after failure ...", file=sys.stderr)
172+
time.sleep(12)
173+
try:
174+
download_from_url(archive_url, archive)
175+
except Exception as e2:
176+
print(f"\nDownload failed a second time: {e2}", file=sys.stderr)
177+
return 1
172178

173179
hasher = hashlib.sha256()
174180
with open(archive, "rb") as afile:

0 commit comments

Comments
 (0)