From 54cf282837713870833413646e1741ae1ea83df5 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Mon, 16 Jan 2023 03:48:35 +0800 Subject: [PATCH] fix --- utils/FileUtils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/FileUtils.py b/utils/FileUtils.py index ddfe1b7..690152a 100644 --- a/utils/FileUtils.py +++ b/utils/FileUtils.py @@ -209,6 +209,7 @@ class fileUtils: img.verify() return True except: - os.remove(file_path) + if os.path.exists(file_path): + os.remove(file_path) print(f"{file_path}已损坏 type:{type},删除重试中") return False \ No newline at end of file