fix
This commit is contained in:
parent
3bad7f3e90
commit
a33831ef02
@ -217,10 +217,10 @@ class fileUtils:
|
|||||||
return size
|
return size
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def ver_file(cls,file_path,type):
|
def ver_file(cls,file_path,type,min_size=1):
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
file_size_unit = cls.size(file_path,unit="kb")
|
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:
|
try:
|
||||||
img = Image.open(file_path)
|
img = Image.open(file_path)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user