[Reproducible-commits] [diffoscope] 08/21: Let's ignore command errors if content is identical

Jérémy Bobbio lunar at moszumanska.debian.org
Mon Sep 21 17:39:27 UTC 2015


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

lunar pushed a commit to branch master
in repository diffoscope.

commit 324bc3e96a2ec703d57e92b1fe4068050bab77db
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Sat Sep 19 18:47:45 2015 +0200

    Let's ignore command errors if content is identical
    
    Before we would crash by trying to add a comment to None.
---
 diffoscope/comparators/binary.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/diffoscope/comparators/binary.py b/diffoscope/comparators/binary.py
index ca040ce..ade85f5 100644
--- a/diffoscope/comparators/binary.py
+++ b/diffoscope/comparators/binary.py
@@ -186,6 +186,8 @@ class File(object):
                 difference = self.compare_bytes(other, source=source)
                 output = re.sub(r'^', '    ', e.output.decode('utf-8', errors='replace'), flags=re.MULTILINE)
                 cmd = ' '.join(e.cmd)
+                if difference is None:
+                    return None
                 difference.add_comment("Command `%s` exited with %d. Output:\n%s"
                                        % (cmd, e.returncode, output))
             except RequiredToolNotFound as e:

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



More information about the Reproducible-commits mailing list