Decode tempest exception output (py3) 84/67984/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Sat, 1 Jun 2019 08:52:05 +0000 (10:52 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sat, 1 Jun 2019 09:14:18 +0000 (11:14 +0200)
https://build.opnfv.org/ci/job/functest-opnfv-functest-smoke-latest-refstack_compute-run/30/console

Change-Id: I77264525917af5f67cdecae85ef7a50439499db8
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/opnfv_tests/openstack/refstack/refstack.py
functest/opnfv_tests/openstack/vmtp/vmtp.py

index a58efcf..faf183f 100644 (file)
@@ -45,7 +45,7 @@ class Refstack(tempest.TempestCommon):
         except subprocess.CalledProcessError as cpe:
             self.__logger.error(
                 "Exception when listing tempest tests: %s\n%s",
-                cpe.cmd, cpe.output)
+                cpe.cmd, cpe.output.decode("utf-8"))
             raise
         finally:
             os.chdir(olddir)
index f478848..c146d60 100644 (file)
@@ -180,7 +180,8 @@ class Vmtp(singlevm.VmReady2):
             status = testcase.TestCase.EX_OK
         except subprocess.CalledProcessError as cpe:
             self.__logger.error(
-                "Exception when calling %s\n%s", cpe.cmd, cpe.output)
+                "Exception when calling %s\n%s", cpe.cmd,
+                cpe.output.decode("utf-8"))
             self.result = 0
         except Exception:  # pylint: disable=broad-except
             self.__logger.exception("Cannot run vmtp")