diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-07-13 13:42:40 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-07-13 13:42:40 +0900 |
commit | e54c28df429db38dd721c17fccc1229e729a526d (patch) | |
tree | 8ca1ff9fc89812c2ec4cd806eeec73bb72e46b7a | |
parent | 3ac504ff3d4ec433e09b9b7668026e8f6a7e6a8c (diff) | |
download | buildstream-e54c28df429db38dd721c17fccc1229e729a526d.tar.gz |
_frontend/widget.py: Fixed stack trace found by Tristan Maat
Early return in print_summary() if scheduler.queues is None,
can happen when the pipeline early returns before running
the scheduler for any reason, in which case we dont care
about printing a summary of what never even happened.
-rw-r--r-- | buildstream/_frontend/widget.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/buildstream/_frontend/widget.py b/buildstream/_frontend/widget.py index cd4cbdcbb..a371799ea 100644 --- a/buildstream/_frontend/widget.py +++ b/buildstream/_frontend/widget.py @@ -459,6 +459,12 @@ class LogLine(Widget): # def print_summary(self, pipeline, scheduler, log_file, styling=False): + # Early silent return if there are no queues, can happen + # only in the case that the pipeline early returned due to + # an inconsistent pipeline state. + if scheduler.queues is None: + return + text = self.content_profile.fmt("Pipeline Summary\n", bold=True) values = OrderedDict() values['Total'] = self.content_profile.fmt(str(pipeline.total_elements)) |