[Reproducible-commits] [diffoscope] 04/21: Decode the output given by subprocess.CalledProcessError
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 d957cddaac4fe548d940516905ae4360be8cdff7
Author: Jérémy Bobbio <lunar at debian.org>
Date: Fri Sep 18 15:47:18 2015 +0200
Decode the output given by subprocess.CalledProcessError
It's actually returning bytes. Let's hope the messages will be in UTF-8,
but we replace decoding errors.
---
diffoscope/comparators/binary.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diffoscope/comparators/binary.py b/diffoscope/comparators/binary.py
index b9373ea..ca040ce 100644
--- a/diffoscope/comparators/binary.py
+++ b/diffoscope/comparators/binary.py
@@ -184,7 +184,7 @@ class File(object):
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, flags=re.MULTILINE)
+ output = re.sub(r'^', ' ', e.output.decode('utf-8', errors='replace'), flags=re.MULTILINE)
cmd = ' '.join(e.cmd)
difference.add_comment("Command `%s` exited with %d. Output:\n%s"
% (cmd, e.returncode, output))
--
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