util: improves error messages on get_previous_releases script

If a requested version doesn't exist on our list of checksums it says it cannot do a checksum comparision instead of saying it did not match
This commit is contained in:
Nelson Galdeman 2021-07-20 09:50:54 +01:00
parent d8f1e1327f
commit 179a051704
No known key found for this signature in database
GPG key ID: 4369E8EABC7694BE

View file

@ -104,8 +104,12 @@ def download_binary(tag, args) -> int:
tarballHash = hasher.hexdigest() tarballHash = hasher.hexdigest()
if tarballHash not in SHA256_SUMS or SHA256_SUMS[tarballHash] != tarball: if tarballHash not in SHA256_SUMS or SHA256_SUMS[tarballHash] != tarball:
if tarball in SHA256_SUMS.values():
print("Checksum did not match") print("Checksum did not match")
return 1 return 1
print("Checksum for given version doesn't exist")
return 1
print("Checksum matched") print("Checksum matched")
# Extract tarball # Extract tarball