Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 4EFADE00B47; Wed, 10 May 2017 00:03:30 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B5E67E00B3E for ; Wed, 10 May 2017 00:03:28 -0700 (PDT) Received: from ALA-HCB.corp.ad.wrs.com (ala-hcb.corp.ad.wrs.com [147.11.189.41]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id v4A73ROb025513 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK) for ; Wed, 10 May 2017 00:03:27 -0700 Received: from ala-dreyna-lx3.corp.ad.wrs.com (147.11.216.91) by ALA-HCB.corp.ad.wrs.com (147.11.189.41) with Microsoft SMTP Server (TLS) id 14.3.294.0; Wed, 10 May 2017 00:03:25 -0700 From: David Reyna To: Date: Tue, 9 May 2017 23:54:22 -0700 Message-ID: <1494399262-4653-1-git-send-email-david.reyna@windriver.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [147.11.216.91] Subject: [PATCH] toaster: add getMessage to MockEvent X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 May 2017 07:03:30 -0000 Content-Type: text/plain From: David Reyna The MockEvent needs to not only stand in for Toaster and Bitbake quick events, it also needs to stand in for LogRecord, and for that it needs to provide the new getMessage method. [YOCTO #11440] Signed-off-by: David Reyna --- bitbake/lib/bb/ui/buildinfohelper.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 46be5a5..12caef9 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py @@ -858,6 +858,12 @@ class MockEvent(object): self.pathname = None self.lineno = None + def getMessage(self): + """ + Simulate LogRecord message return + """ + return self.msg + class BuildInfoHelper(object): """ This class gathers the build information from the server and sends it -- 1.9.1