[bitbake-devel] [PATCH 1/1] toaster: add getMessage to MockEvent

David Reyna david.reyna at windriver.com
Thu Jun 15 04:51:29 UTC 2017


From: David Reyna <David.Reyna at windriver.com>

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 <David.Reyna at windriver.com>
---
 lib/bb/ui/buildinfohelper.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py
index 46be5a5..12caef9 100644
--- a/lib/bb/ui/buildinfohelper.py
+++ b/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




More information about the bitbake-devel mailing list