diff options
author | Chris Johns <chrisj@rtems.org> | 2018-11-07 14:55:20 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2018-11-08 18:13:45 +1100 |
commit | e058db02816d7729e7cfa898522a6073f5d7e714 (patch) | |
tree | aa70574c9b277224be596553881e75fc3924111c /rtemstoolkit/log.py | |
parent | 087be8c67f04d9f3457e9c74a97e636bec202ead (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-x | rtemstoolkit/log.py | 4 |
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)): |