From: Aníbal Limón Date: Thu, 9 Feb 2017 20:53:17 +0000 (-0600) Subject: oeqa/core/runner.py: OEStreamLogger fix logging X-Git-Tag: uninative-1.5~370 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=545dd180cc27a69732f2332565038bd06d01c014;p=openembedded-core.git oeqa/core/runner.py: OEStreamLogger fix logging 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 Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/core/runner.py b/meta/lib/oeqa/core/runner.py index 8f5af579f3..0f158c39f1 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"))