mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-07-05 03:27:09 +00:00
python: also delete partial file on KeyboardInterrupt/SystemExit (#2154)
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
parent
71d7f34d1a
commit
71db8bdc80
@ -362,7 +362,7 @@ class GPT4All:
|
|||||||
bar.update(len(chunk))
|
bar.update(len(chunk))
|
||||||
if hsh.hexdigest() != expected_md5.lower():
|
if hsh.hexdigest() != expected_md5.lower():
|
||||||
raise ValueError(f"Expected MD5 hash of {expected_md5!r}, got {hsh.hexdigest()!r}")
|
raise ValueError(f"Expected MD5 hash of {expected_md5!r}, got {hsh.hexdigest()!r}")
|
||||||
except Exception:
|
except:
|
||||||
if verbose:
|
if verbose:
|
||||||
print("Cleaning up the interrupted download...", file=sys.stderr)
|
print("Cleaning up the interrupted download...", file=sys.stderr)
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user