summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-04-12 10:58:09 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-04-12 11:20:35 +0100
commit007d6adce51d9494ad8e44e5ed0bc3cc840b98cb (patch)
tree1c494372b043ca18d4626c4018178da4b7e60e8f
parent024df4fab108a6146d07f833856520d4191335cc (diff)
downloadbuildstream-jmac/rename_size_request.tar.gz
widget.py: MessageOrLogFile: Pass prepare call on to owned widgetsjmac/rename_size_request
Check for empty logdir string is no longer necessary with this fix.
-rw-r--r--buildstream/_frontend/widget.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/buildstream/_frontend/widget.py b/buildstream/_frontend/widget.py
index cf98393d3..01c4188ce 100644
--- a/buildstream/_frontend/widget.py
+++ b/buildstream/_frontend/widget.py
@@ -276,7 +276,7 @@ class LogFile(Widget):
if message.logfile and message.scheduler:
logfile = message.logfile
- if abbrev and self.logdir != "" and logfile.startswith(self.logdir):
+ if abbrev and logfile.startswith(self.logdir):
logfile = logfile[len(self.logdir):]
logfile = logfile.lstrip(os.sep)
@@ -300,6 +300,10 @@ class MessageOrLogFile(Widget):
self.message_widget = MessageText(content_profile, format_profile)
self.logfile_widget = LogFile(content_profile, format_profile, err_profile)
+ def prepare(self, pipeline):
+ self.message_widget.prepare(pipeline)
+ self.logfile_widget.prepare(pipeline)
+
def render(self, message):
# Show the log file only in the main start/success messages
if message.logfile and message.scheduler and \