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