From 71db8bdc804bfacb0998684cbb94ac499562d8bb Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Thu, 21 Mar 2024 12:59:35 -0400 Subject: [PATCH] python: also delete partial file on KeyboardInterrupt/SystemExit (#2154) Signed-off-by: Jared Van Bortel --- gpt4all-bindings/python/gpt4all/gpt4all.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpt4all-bindings/python/gpt4all/gpt4all.py b/gpt4all-bindings/python/gpt4all/gpt4all.py index ae4feeb1..fadcc684 100644 --- a/gpt4all-bindings/python/gpt4all/gpt4all.py +++ b/gpt4all-bindings/python/gpt4all/gpt4all.py @@ -362,7 +362,7 @@ class GPT4All: bar.update(len(chunk)) if hsh.hexdigest() != expected_md5.lower(): raise ValueError(f"Expected MD5 hash of {expected_md5!r}, got {hsh.hexdigest()!r}") - except Exception: + except: if verbose: print("Cleaning up the interrupted download...", file=sys.stderr) try: