From 6a5823b74ac641459c300683291db09a69c61453 Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Tue, 2 Jul 2019 13:45:21 -0700 Subject: [PATCH] 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. --- qubesmanager/global_settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubesmanager/global_settings.py b/qubesmanager/global_settings.py index 32d8d07..5f79f9d 100644 --- a/qubesmanager/global_settings.py +++ b/qubesmanager/global_settings.py @@ -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})