[Reproducible-commits] [diffoscope] 11/23: Let's ignore command errors if content is identical
Jérémy Bobbio
lunar at moszumanska.debian.org
Sat Sep 19 23:18:21 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/py3
in repository diffoscope.
commit 084e9e518c1773b59322feef51ad1db0174bb6a1
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