[diffoscope] 03/03: Catch conversion errors when calling out to icoutils

Chris Lamb chris at chris-lamb.co.uk
Tue Jan 10 23:22:08 CET 2017


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit aa936ea948911630a094363b3400352289565b53
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Jan 10 22:21:43 2017 +0000

    Catch conversion errors when calling out to icoutils
---
 diffoscope/comparators/image.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/diffoscope/comparators/image.py b/diffoscope/comparators/image.py
index d47e21b..bc8f069 100644
--- a/diffoscope/comparators/image.py
+++ b/diffoscope/comparators/image.py
@@ -63,7 +63,10 @@ class ICOImageFile(File):
 
     def compare_details(self, other, source=None):
         # img2txt does not support .ico files directly so convert to .PNG.
-        xs = [ICOImageFile.convert(x) for x in (self, other)]
+        try:
+            xs = [ICOImageFile.convert(x) for x in (self, other)]
+        except subprocess.CalledProcessError:
+            return []
 
         return [Difference.from_command(Img2Txt, *xs)]
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list