mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-02 01:18:08 +01:00
add both hashes to "Checksum mismatch"-Exception message
This commit is contained in:
parent
60eece8856
commit
4cde51df49
1 changed files with 4 additions and 1 deletions
|
|
@ -59,7 +59,10 @@ class SysGeneral:
|
|||
readable_hash = hashlib.sha256(downloaded_content).hexdigest()
|
||||
if expected_hash == readable_hash:
|
||||
return
|
||||
raise Exception("Checksum mismatch")
|
||||
raise Exception(f"Checksum mismatch for file {os.path.basename(file_name)}:\n\
|
||||
expected: {expected_hash}\n\
|
||||
actual: {readable_hash}\n\
|
||||
When in doubt, try deleting the file in question -- it will be downloaded again when running this script the next time")
|
||||
|
||||
raise Exception("File checksum is not yet recorded")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue