Commit b331509a authored by Michal Čihař's avatar Michal Čihař

Properly decode error messages

The error message can contain unicode chars, so we need to handle this
gracefully.

Fixes #661
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent f0b8aa03
...@@ -144,7 +144,11 @@ class Repository(object): ...@@ -144,7 +144,11 @@ class Repository(object):
output, output_err = process.communicate() output, output_err = process.communicate()
retcode = process.poll() retcode = process.poll()
if retcode: if retcode:
raise RepositoryException(retcode, output_err, output) raise RepositoryException(
retcode,
output_err.decode('utf-8'),
output.decode('utf-8')
)
return output return output
def execute(self, args): def execute(self, args):
......
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