fixup! FIXUP: Handle diffoci updates appropriately

This commit is contained in:
Alex Pyrgiotis 2025-01-20 15:26:07 +02:00
parent 725ce3b9c7
commit 8911b72529
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA

View file

@ -42,7 +42,7 @@ def git_verify(commit, source):
def diffoci_hash_matches(diffoci):
"""Check if the hash of the downloaded diffoci bin matches the expected one."""
m = hashlib.sha256()
m.update(DIFFOCI_PATH.open().read())
m.update(diffoci)
diffoci_checksum = m.hexdigest()
return diffoci_checksum == DIFFOCI_CHECKSUM
@ -56,7 +56,7 @@ def diffoci_is_installed():
"""
if not DIFFOCI_PATH.exists():
return False
return diffoci_hash_matches(DIFFOCI_PATH.open().read())
return diffoci_hash_matches(DIFFOCI_PATH.open("rb").read())
def diffoci_download():