From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mail.openembedded.org (Postfix) with ESMTP id A14F362134 for ; Thu, 9 Feb 2017 20:50:04 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP; 09 Feb 2017 12:50:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,137,1484035200"; d="scan'208";a="932097278" Received: from alimonb-mobl1.zpn.intel.com ([10.219.128.125]) by orsmga003.jf.intel.com with ESMTP; 09 Feb 2017 12:50:03 -0800 From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= To: openembedded-core@lists.openembedded.org Date: Thu, 9 Feb 2017 14:53:17 -0600 Message-Id: <1486673597-16887-1-git-send-email-anibal.limon@linux.intel.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Subject: [PATCH] oeqa/core/runner.py: OEStreamLogger fix logging X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2017 20:50:05 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- 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