diff options
author | Michael Wood <michael.g.wood@intel.com> | 2016-10-05 17:08:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-10-06 11:41:39 +0100 |
commit | 11b3b6a7087554d14a2812a9ae463dce740b879e (patch) | |
tree | ec46a861da8475fa709ea2031f5e6c6e0e5df11d /lib/bb/ui | |
parent | 263762a01a6460332ef0cfea5df1e5b81c086df4 (diff) | |
download | bitbake-contrib-11b3b6a7087554d14a2812a9ae463dce740b879e.tar.gz |
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)
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 'lib/bb/ui')
-rw-r--r-- | lib/bb/ui/buildinfohelper.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/bb/ui/buildinfohelper.py b/lib/bb/ui/buildinfohelper.py index 970a9415c..5b69660a3 100644 --- a/lib/bb/ui/buildinfohelper.py +++ b/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) |