From a33831ef02278a52dea1ac389b5eecc8d0e3f884 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Sat, 1 Apr 2023 14:15:28 +0800 Subject: [PATCH] fix --- utils/FileUtils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/FileUtils.py b/utils/FileUtils.py index 5fdac94..1b09e8b 100644 --- a/utils/FileUtils.py +++ b/utils/FileUtils.py @@ -217,10 +217,10 @@ class fileUtils: return size @classmethod - def ver_file(cls,file_path,type): + def ver_file(cls,file_path,type,min_size=1): time.sleep(0.1) file_size_unit = cls.size(file_path,unit="kb") - if type == "image" and int(cls.size(file_path)) > 100: + if type == "image" and int(cls.size(file_path)) > min_size: #验证是否是图像 try: img = Image.open(file_path)