diff options
author | Chris Johns <chrisj@rtems.org> | 2017-05-24 12:27:22 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2017-05-24 12:27:22 +1000 |
commit | 4c24f40a999a658448b5f6353f3eed3816503195 (patch) | |
tree | 6e97df57608b743e6dd610af6478c9e68c272f85 /rtemstoolkit | |
parent | 52cfa1838595833f8a1980c6f88d1925f384250c (diff) |
rtemstoolkit: Improve performance.
Diffstat (limited to 'rtemstoolkit')
-rwxr-xr-x | rtemstoolkit/log.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/rtemstoolkit/log.py b/rtemstoolkit/log.py index 4d89b77..c442525 100755 --- a/rtemstoolkit/log.py +++ b/rtemstoolkit/log.py @@ -72,10 +72,7 @@ def _output(text = os.linesep, log = None): if text is None: text = os.linesep if type(text) is list: - _text = '' - for l in text: - _text += l + os.linesep - text = _text + text = os.linesep.join(text) + os.linesep if log: log.output(text) elif default is not None: @@ -168,9 +165,7 @@ class log: # Reformat the text to have local line types. text = text.replace(chr(13), '').splitlines() self._tail(text) - out = '' - for l in text: - out += l + os.linesep + out = os.linesep.join(text) + os.linesep self.lock.acquire() try: for f in range(0, len(self.fhs)): |