Improve the reliability of PNG parsing
This commit is contained in:
parent
efa525c102
commit
be24c681ff
@ -63,7 +63,8 @@ class PNGParser(exiftool.ExiftoolParser):
|
|||||||
|
|
||||||
try: # better fail here than later
|
try: # better fail here than later
|
||||||
cairo.ImageSurface.create_from_png(self.filename)
|
cairo.ImageSurface.create_from_png(self.filename)
|
||||||
except MemoryError: # pragma: no cover
|
except Exception: # pragma: no cover
|
||||||
|
# Cairo is returning some weird exceptions :/
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
def remove_all(self) -> bool:
|
def remove_all(self) -> bool:
|
||||||
|
Loading…
Reference in New Issue
Block a user