mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-17 18:51:50 +02:00
fixup! FIXUP: Handle diffoci updates appropriately
This commit is contained in:
parent
725ce3b9c7
commit
8911b72529
1 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ def git_verify(commit, source):
|
||||||
def diffoci_hash_matches(diffoci):
|
def diffoci_hash_matches(diffoci):
|
||||||
"""Check if the hash of the downloaded diffoci bin matches the expected one."""
|
"""Check if the hash of the downloaded diffoci bin matches the expected one."""
|
||||||
m = hashlib.sha256()
|
m = hashlib.sha256()
|
||||||
m.update(DIFFOCI_PATH.open().read())
|
m.update(diffoci)
|
||||||
diffoci_checksum = m.hexdigest()
|
diffoci_checksum = m.hexdigest()
|
||||||
return diffoci_checksum == DIFFOCI_CHECKSUM
|
return diffoci_checksum == DIFFOCI_CHECKSUM
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ def diffoci_is_installed():
|
||||||
"""
|
"""
|
||||||
if not DIFFOCI_PATH.exists():
|
if not DIFFOCI_PATH.exists():
|
||||||
return False
|
return False
|
||||||
return diffoci_hash_matches(DIFFOCI_PATH.open().read())
|
return diffoci_hash_matches(DIFFOCI_PATH.open("rb").read())
|
||||||
|
|
||||||
|
|
||||||
def diffoci_download():
|
def diffoci_download():
|
||||||
|
|
Loading…
Reference in a new issue