From 821fe7fc4645e9198d220a7fead4ed12ba983ed7 Mon Sep 17 00:00:00 2001 From: Bill Peck Date: Wed, 27 Sep 2023 10:51:29 -0400 Subject: [PATCH] Update to fix junit results on python3 The same result that was put in place for regular xml results is also needed for the junit results when running with python3. --- Client/src/bkr/client/commands/cmd_job_results.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Client/src/bkr/client/commands/cmd_job_results.py b/Client/src/bkr/client/commands/cmd_job_results.py index 88dd98f23..3ebf40a61 100644 --- a/Client/src/bkr/client/commands/cmd_job_results.py +++ b/Client/src/bkr/client/commands/cmd_job_results.py @@ -138,6 +138,9 @@ def run(self, *args, **kwargs): self.parser.error('JUnit XML format is only available for jobs') response = requests_session.get('jobs/%s.junit.xml' % id) response.raise_for_status() - print(response.content) + str_xml = response.content + if six.PY3: + str_xml = str_xml.decode('utf-8') + print(str_xml) else: raise RuntimeError('Format %s not implemented' % format)