aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-10-05 17:08:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-06 11:41:48 +0100
commit25ea0b625dd8dc8c5a19beb42d3aefce3501b3e2 (patch)
tree9ba71d9bd82f9a1934045b14eec619c5fe3d1deb /bitbake/lib
parentfffce32ebd8712e29cc6f9c4a7a97ce40f9916ee (diff)
downloadopenembedded-core-contrib-25ea0b625dd8dc8c5a19beb42d3aefce3501b3e2.tar.gz
bitbake: toaster: buildinfohelper: Use correct way to get message from LogMessage
Use the correct method to get a message value from the LogMessage object rather than constructing it ourselves which is not recommended. This causes an exception when the msg contains a '%' such as when there are wildcards in file names (something2.%.bbappends) (Bitbake rev: 11b3b6a7087554d14a2812a9ae463dce740b879e) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 970a9415c1..5b69660a39 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -1565,16 +1565,12 @@ class BuildInfoHelper(object):
mockevent.lineno = -1
self.store_log_event(mockevent)
-
def store_log_event(self, event):
self._ensure_build()
if event.levelno < formatter.WARNING:
return
- if 'args' in vars(event):
- event.msg = event.msg % event.args
-
# early return for CLI builds
if self.brbe is None:
if not 'backlog' in self.internal_state:
@@ -1586,7 +1582,8 @@ class BuildInfoHelper(object):
# if we have a backlog of events, do our best to save them here
if len(self.internal_state['backlog']):
tempevent = self.internal_state['backlog'].pop()
- logger.debug(1, "buildinfohelper: Saving stored event %s " % tempevent)
+ logger.debug(1, "buildinfohelper: Saving stored event %s "
+ % tempevent)
self.store_log_event(tempevent)
else:
logger.info("buildinfohelper: All events saved")
@@ -1605,7 +1602,7 @@ class BuildInfoHelper(object):
else:
log_information['level'] = LogMessage.INFO
- log_information['message'] = event.msg
+ log_information['message'] = event.getMessage()
log_information['pathname'] = event.pathname
log_information['lineno'] = event.lineno
logger.info("Logging error 2: %s", log_information)