aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/core/feature.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2019-05-07 10:42:23 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2019-05-07 14:44:14 +0200
commit6f8aa2785e0239dbed22fcb4d093a5bc110bcc3c (patch)
treea1861e9ba8f43f1e0d0e8e506c9b70041a2c2456 /xtesting/core/feature.py
parentf5d73689bdd4e9dbff98c04e190023b7f66ed7c9 (diff)
Update to Python3
Now Xtesting containers use Python3 instead of python2. https://mail.python.org/pipermail/python-dev/2018-March/152348.html It also updates robotframework to latest release. Change-Id: I57e0d8b1af9aeaae0c445941a9bdf0b8bd346834 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'xtesting/core/feature.py')
-rw-r--r--xtesting/core/feature.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/xtesting/core/feature.py b/xtesting/core/feature.py
index 2730179f..f28e720c 100644
--- a/xtesting/core/feature.py
+++ b/xtesting/core/feature.py
@@ -111,10 +111,10 @@ class BashFeature(Feature):
process = subprocess.Popen(
cmd, shell=True, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
- for line in iter(process.stdout.readline, ''):
+ for line in iter(process.stdout.readline, b''):
if console:
- sys.stdout.write(line)
- f_stdout.write(line)
+ 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())