[rtems-tools commit] rtemstoolkit: Improve performance.
Chris Johns
chrisj at rtems.org
Wed May 24 02:28:55 UTC 2017
Module: rtems-tools
Branch: master
Commit: 4c24f40a999a658448b5f6353f3eed3816503195
Changeset: http://git.rtems.org/rtems-tools/commit/?id=4c24f40a999a658448b5f6353f3eed3816503195
Author: Chris Johns <chrisj at rtems.org>
Date: Wed May 24 12:27:22 2017 +1000
rtemstoolkit: Improve performance.
---
rtemstoolkit/log.py | 9 ++-------
1 file 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)):
More information about the vc
mailing list