From fc5a5952f07711b0452190da8a92e7ed3138a0d7 Mon Sep 17 00:00:00 2001 From: ebolam Date: Sun, 18 Sep 2022 20:31:21 -0400 Subject: [PATCH] Fix --- utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 1a9b0d80..193a7a19 100644 --- a/utils.py +++ b/utils.py @@ -229,7 +229,8 @@ def _download_with_aria2(aria2_config: str, total_length: int, directory: str = raise e finally: try: - os.remove(path) + if os.path.exists(path): + os.remove(path) except OSError: pass code = p.wait()