Skip to content

Commit

Permalink
dev(narugo): try fix
Browse files Browse the repository at this point in the history
  • Loading branch information
narugo1992 committed Sep 13, 2024
1 parent 1953a21 commit 918f48a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions skpick/check/hqimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
def is_hqimage(file, face_threshold: int = 5000):
try:
image = Image.open(file)
image.load()
except UnidentifiedImageError:
return False
except OSError:
Expand All @@ -32,7 +31,7 @@ def is_hqimage(file, face_threshold: int = 5000):
area = abs((x1 - x0) * (y1 - y0))
if area >= face_threshold:
return True
except OSError:
except (OSError, SyntaxError):
return False

return False

0 comments on commit 918f48a

Please sign in to comment.