bitbake: toaster: add getMessage to MockEvent

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]

(Bitbake rev: e95ed33726b2a6d03382e07c6efe2ab574f84ee8)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
David Reyna 2017-06-14 21:51:29 -07:00 committed by Richard Purdie
parent 55f8db0246
commit b161cb0c35
1 changed files with 6 additions and 0 deletions

View File

@ -858,6 +858,12 @@ class MockEvent(object):
self.pathname = None self.pathname = None
self.lineno = None self.lineno = None
def getMessage(self):
"""
Simulate LogRecord message return
"""
return self.msg
class BuildInfoHelper(object): class BuildInfoHelper(object):
""" This class gathers the build information from the server and sends it """ This class gathers the build information from the server and sends it