aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/vmtp
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2019-05-25 09:38:40 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2019-05-25 11:24:42 +0200
commit0e19012c4f11cc09c323476511893bbf3893a508 (patch)
tree288971a8bdf0eac310b9bc95834de08930886409 /functest/opnfv_tests/openstack/vmtp
parent4b102db86a426d0b56168cb7621e9baa42aeb93b (diff)
Set utf-8 in decode and encode calls
It eases backporting in iruya and hunter as a few logs can't be decoded as ascii [1]. [1] https://build.opnfv.org/ci/job/functest-opnfv-functest-vnf-iruya-juju_epc-run/56/console Change-Id: I52a6f9a25130cbf62e8ce3b9972064ab73177665 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 5853dd1ef3c522a975f9685250b1b3e85588f738)
Diffstat (limited to 'functest/opnfv_tests/openstack/vmtp')
-rw-r--r--functest/opnfv_tests/openstack/vmtp/vmtp.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/functest/opnfv_tests/openstack/vmtp/vmtp.py b/functest/opnfv_tests/openstack/vmtp/vmtp.py
index 4397e2b47..57bc6c3ea 100644
--- a/functest/opnfv_tests/openstack/vmtp/vmtp.py
+++ b/functest/opnfv_tests/openstack/vmtp/vmtp.py
@@ -104,7 +104,7 @@ class Vmtp(singlevm.VmReady2):
if not os.path.exists(self.res_dir):
os.makedirs(self.res_dir)
cmd = ['vmtp', '-sc']
- output = subprocess.check_output(cmd).decode()
+ output = subprocess.check_output(cmd).decode("utf-8")
self.__logger.info("%s\n%s", " ".join(cmd), output)
with open(self.config, "w+") as conf:
vmtp_conf = yaml.load(output)
@@ -146,12 +146,12 @@ class Vmtp(singlevm.VmReady2):
cmd = ['vmtp', '-d', '--json', '{}/vmtp.json'.format(self.res_dir),
'-c', self.config]
output = subprocess.check_output(
- cmd, stderr=subprocess.STDOUT, env=new_env).decode()
+ cmd, stderr=subprocess.STDOUT, env=new_env).decode("utf-8")
self.__logger.info("%s\n%s", " ".join(cmd), output)
cmd = ['vmtp_genchart', '-c', '{}/vmtp.html'.format(self.res_dir),
'{}/vmtp.json'.format(self.res_dir)]
output = subprocess.check_output(
- cmd, stderr=subprocess.STDOUT).decode()
+ cmd, stderr=subprocess.STDOUT).decode("utf-8")
self.__logger.info("%s\n%s", " ".join(cmd), output)
with open('{}/vmtp.json'.format(self.res_dir), 'r') as res_file:
self.details = json.load(res_file)