diff --git a/pkg/image.py b/pkg/image.py index 2a9b9d6..ea778fc 100644 --- a/pkg/image.py +++ b/pkg/image.py @@ -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