Decode stderr in repo qrexec calls

Before this change, "foobar\n" on stderr would be rendered (in the
warning dialog) as "b'foobar\n'", which is ugly. Now it'll be rendered
just as "foobar", followed by an actual newline character.
This commit is contained in:
AJ Jordan 2019-07-02 13:45:21 -07:00
parent 4931bf9401
commit 6a5823b74a
No known key found for this signature in database
GPG Key ID: 26794034633DBBC0

View File

@ -47,7 +47,7 @@ def _run_qrexec_repo(service, arg=''):
)
if p.stderr:
raise RuntimeError('qrexec call stderr was not empty',
{'stderr': p.stderr})
{'stderr': p.stderr.decode('utf-8')})
if p.returncode != 0:
raise RuntimeError('qrexec call exited with non-zero return code',
{'returncode': p.returncode})