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's avatarMattia Rizzolo <mattia@debian.org>
parent e580d202
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment