Skip to content
Snippets Groups Projects
Commit ef47f9c7 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

[download] better error message

parent 3604a0ba
Branches
Tags
1 merge request!140[download] better error message
Pipeline #60540 passed
......@@ -279,8 +279,9 @@ def get_file(
if file_hash is not None and not validate_file(
final_filename, file_hash, algorithm=hash_algorithm
):
found_hash = _hash_file(final_filename, algorithm=hash_algorithm)
raise ValueError(
"File was downloaded, but it is corrupted. Please re-do the procedure."
f"The downloaded file: {final_filename} has the hash of {found_hash}, but we expected {file_hash}. Please re-do the procedure."
)
return final_filename
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment