[OE-core] [PATCH] oeqa/core/runner.py: OEStreamLogger fix logging
Aníbal Limón
anibal.limon at linux.intel.com
Thu Feb 9 20:53:17 UTC 2017
Change conditional to avoid losing stack traces when log
into the logger. The logic only needs to don't log empty lines.
Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
meta/lib/oeqa/core/runner.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py
index 8f5af57..0f158c3 100644
--- a/meta/lib/oeqa/core/runner.py
+++ b/meta/lib/oeqa/core/runner.py
@@ -23,7 +23,7 @@ class OEStreamLogger(object):
self.buffer = ""
def write(self, msg):
- if msg[-1] != '\n':
+ if len(msg) > 1 and msg[0] != '\n':
self.buffer += msg
else:
self.logger.log(logging.INFO, self.buffer.rstrip("\n"))
--
2.1.4
More information about the Openembedded-core
mailing list