fix png check failing

This commit is contained in:
Cyberes 2023-11-04 20:16:37 -06:00
parent 14ac8f4dde
commit 5f330078bf
1 changed files with 5 additions and 2 deletions

View File

@ -17,5 +17,8 @@ def is_png(file_path):
:param file_path:
:return:
"""
img = Image.open(file_path)
return img.format == 'PNG'
try:
img = Image.open(file_path)
return img.format == 'PNG'
except:
return False