summaryrefslogtreecommitdiff
path: root/rtemstoolkit/log.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-11-07 14:55:20 +1100
committerChris Johns <chrisj@rtems.org>2018-11-08 18:13:45 +1100
commite058db02816d7729e7cfa898522a6073f5d7e714 (patch)
treeaa70574c9b277224be596553881e75fc3924111c /rtemstoolkit/log.py
parent087be8c67f04d9f3457e9c74a97e636bec202ead (diff)
python: Provide support to select a valid python version.
- Update imports after wrapping the code. - Fix python3 issues. - Fix config path issues for in repo and install runs. Closes #3537
Diffstat (limited to 'rtemstoolkit/log.py')
-rwxr-xr-xrtemstoolkit/log.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/rtemstoolkit/log.py b/rtemstoolkit/log.py
index 3eb2c1b..76a2767 100755
--- a/rtemstoolkit/log.py
+++ b/rtemstoolkit/log.py
@@ -78,6 +78,8 @@ def _output(text = os.linesep, log = None):
text = os.linesep
if type(text) is list:
text = os.linesep.join(text) + os.linesep
+ if isinstance(text, bytes):
+ text = text.decode('utf-8', 'ignore')
if log:
log.output(text)
elif default is not None:
@@ -175,6 +177,8 @@ class log:
text = text.replace(chr(13), '').splitlines()
self._tail(text)
out = os.linesep.join(text) + os.linesep
+ if isinstance(out, bytes):
+ out = out.decode('utf-8', 'ignore')
self.lock.acquire()
try:
for f in range(0, len(self.fhs)):