From 8c1107c358ab25e541779d57f4d802bb491d55b0 Mon Sep 17 00:00:00 2001
From: jvoisin <julien.voisin@dustri.org>
Date: Mon, 21 Jun 2021 22:39:45 +0200
Subject: [PATCH] Make cairo behave in a less idiotic way

Because raising errors when unable to process
stuff instead of an exception is dumb.
---
 libmat2/images.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmat2/images.py b/libmat2/images.py
index 86e6b17..e55b765 100644
--- a/libmat2/images.py
+++ b/libmat2/images.py
@@ -63,7 +63,7 @@ class PNGParser(exiftool.ExiftoolParser):
 
         try:  # better fail here than later
             cairo.ImageSurface.create_from_png(self.filename)
-        except Exception:  # pragma: no cover
+        except:  # pragma: no cover
             # Cairo is returning some weird exceptions :/
             raise ValueError
 
-- 
GitLab