[diffoscope] 01/01: comparators.utils.file: don't try to decode a string
Mattia Rizzolo
mattia at debian.org
Thu Mar 8 11:48:21 CET 2018
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch master
in repository diffoscope.
commit 934dfffbb51e3de64af79e5f74a2f022d1ad37fe
Author: Mattia Rizzolo <mattia at debian.org>
Date: Thu Mar 8 11:45:51 2018 +0100
comparators.utils.file: don't try to decode a string
e.output (i.e., the command's stderr) is now already UTF-8 encoded at
its source.
Closes: #891903
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
diffoscope/comparators/utils/file.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/diffoscope/comparators/utils/file.py b/diffoscope/comparators/utils/file.py
index e3abb6a..6846d21 100644
--- a/diffoscope/comparators/utils/file.py
+++ b/diffoscope/comparators/utils/file.py
@@ -372,7 +372,7 @@ class File(object, metaclass=abc.ABCMeta):
except subprocess.CalledProcessError as e:
difference = self.compare_bytes(other, source=source)
if e.output:
- output = re.sub(r'^', ' ', e.output.decode('utf-8', errors='replace'), flags=re.MULTILINE)
+ output = re.sub(r'^', ' ', e.output, flags=re.MULTILINE)
else:
output = '<none>'
cmd = ' '.join(e.cmd)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list