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

Merge branch 'download' into 'master'

[download] better error message

See merge request !140
parents 3604a0ba ef47f9c7
No related branches found
No related tags found
1 merge request!140[download] better error message
Pipeline #60546 passed
...@@ -279,8 +279,9 @@ def get_file( ...@@ -279,8 +279,9 @@ def get_file(
if file_hash is not None and not validate_file( if file_hash is not None and not validate_file(
final_filename, file_hash, algorithm=hash_algorithm final_filename, file_hash, algorithm=hash_algorithm
): ):
found_hash = _hash_file(final_filename, algorithm=hash_algorithm)
raise ValueError( 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 return final_filename
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment