From 12aa6e34ec1f388a40cb5a00826729f7c0d6f201 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sat, 25 May 2019 09:55:02 +0200 Subject: Set utf-8 in decode and encode calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: I09c793469bdf4a679e6ed5a268e705efa5f2a20f Signed-off-by: Cédric Ollivier --- xtesting/core/feature.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xtesting/core/feature.py') diff --git a/xtesting/core/feature.py b/xtesting/core/feature.py index 6d5d7410..f28e720c 100644 --- a/xtesting/core/feature.py +++ b/xtesting/core/feature.py @@ -113,8 +113,8 @@ class BashFeature(Feature): stderr=subprocess.STDOUT) for line in iter(process.stdout.readline, b''): if console: - sys.stdout.write(line.decode()) - f_stdout.write(line.decode()) + sys.stdout.write(line.decode("utf-8")) + f_stdout.write(line.decode("utf-8")) process.wait() with open(self.result_file, 'r') as f_stdin: self.__logger.debug("$ %s\n%s", cmd, f_stdin.read().rstrip()) -- cgit 1.2.3-korg