Improve the reliability of Gdk-based parsers
This commit is contained in:
parent
be24c681ff
commit
2e3496d3d4
@ -112,7 +112,11 @@ class GdkPixbufAbstractParser(exiftool.ExiftoolParser):
|
|||||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.filename)
|
pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.filename)
|
||||||
if extension.lower() == '.jpg':
|
if extension.lower() == '.jpg':
|
||||||
extension = '.jpeg' # gdk is picky
|
extension = '.jpeg' # gdk is picky
|
||||||
pixbuf.savev(self.output_filename, type=extension[1:], option_keys=[], option_values=[])
|
try:
|
||||||
|
pixbuf.savev(self.output_filename, type=extension[1:],
|
||||||
|
option_keys=[], option_values=[])
|
||||||
|
except GLib.GError: # pragma: no cover
|
||||||
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user