summaryrefslogtreecommitdiff
path: root/libmat2/images.py
diff options
context:
space:
mode:
authorjvoisin2019-12-15 07:05:53 -0800
committerjvoisin2019-12-15 07:05:53 -0800
commit2e3496d3d49776a83b35e5f72ef50a642f350f58 (patch)
tree16d5502a57ac37d548d46dff018e6ce1f74c888b /libmat2/images.py
parentbe24c681ffe200fdd8021e2862864d55787852f9 (diff)
Improve the reliability of Gdk-based parsers
Diffstat (limited to 'libmat2/images.py')
-rw-r--r--libmat2/images.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/libmat2/images.py b/libmat2/images.py
index da42258..6066b07 100644
--- a/libmat2/images.py
+++ b/libmat2/images.py
@@ -112,7 +112,11 @@ class GdkPixbufAbstractParser(exiftool.ExiftoolParser):
112 pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.filename) 112 pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.filename)
113 if extension.lower() == '.jpg': 113 if extension.lower() == '.jpg':
114 extension = '.jpeg' # gdk is picky 114 extension = '.jpeg' # gdk is picky
115 pixbuf.savev(self.output_filename, type=extension[1:], option_keys=[], option_values=[]) 115 try:
116 pixbuf.savev(self.output_filename, type=extension[1:],
117 option_keys=[], option_values=[])
118 except GLib.GError: # pragma: no cover
119 return False
116 return True 120 return True
117 121
118 122