Skip to content

Commit 8bc4a11

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#22442: util: improves error messages on get_previous_releases script
179a051 util: improves error messages on get_previous_releases script (Nelson Galdeman) Pull request description: When previous releases are fetched and the specified version wasn't added to the checksum list we used to get a "Checksum did not match" which isn't true (bitcoin-core/bitcoincore.org#753 (comment)). If the specified version number is not on the list, it now logs cannot do the comparison instead. ACKs for top commit: practicalswift: cr ACK 179a051 theStack: tACK 179a051, tested on Debian bullseye/sid Tree-SHA512: 2a07ce75232f853fd311c43581f8faf12d423668946ae6ad784feece5b4d0edd57fc018ba1f0c5a73bfaccb326e0df9a643580d16bf427c1ec3ff34a9cdbc80c
2 parents 401db60 + 179a051 commit 8bc4a11

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/get_previous_releases.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ def download_binary(tag, args) -> int:
112112
tarballHash = hasher.hexdigest()
113113

114114
if tarballHash not in SHA256_SUMS or SHA256_SUMS[tarballHash] != tarball:
115-
print("Checksum did not match")
115+
if tarball in SHA256_SUMS.values():
116+
print("Checksum did not match")
117+
return 1
118+
119+
print("Checksum for given version doesn't exist")
116120
return 1
117121
print("Checksum matched")
118122

0 commit comments

Comments
 (0)