[Reproducible-commits] [diffoscope] 02/13: Handle subprocess errors with no output when comparing with a command
Jérémy Bobbio
lunar at moszumanska.debian.org
Thu Oct 15 16:04:34 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 eff5aa2b735bde55d45f977b39c0a0090e09abf4
Author: Jérémy Bobbio <lunar at debian.org>
Date: Sat Sep 26 07:49:19 2015 +0000
Handle subprocess errors with no output when comparing with a command
---
diffoscope/comparators/binary.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/diffoscope/comparators/binary.py b/diffoscope/comparators/binary.py
index b156ec6..6cf538b 100644
--- a/diffoscope/comparators/binary.py
+++ b/diffoscope/comparators/binary.py
@@ -182,7 +182,10 @@ class File(object, metaclass=ABCMeta):
difference.add_comment("No differences found inside, yet data differs")
except subprocess.CalledProcessError as e:
difference = self.compare_bytes(other, source=source)
- output = re.sub(r'^', ' ', e.output.decode('utf-8', errors='replace'), flags=re.MULTILINE)
+ if e.output:
+ output = re.sub(r'^', ' ', e.output.decode('utf-8', errors='replace'), flags=re.MULTILINE)
+ else:
+ output = '<none>'
cmd = ' '.join(e.cmd)
if difference is None:
return None
--
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