You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:55:48 UTC

[buildstream] 04/12: _frontend/widget.py: Render cached failures differently to successes

This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch richardmaw/wip/log-show
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit e894f93628a2892de2b68e121879bf86360ee6bd
Author: Richard Maw <ri...@codethink.co.uk>
AuthorDate: Mon Jun 4 18:11:52 2018 +0100

    _frontend/widget.py: Render cached failures differently to successes
---
 buildstream/_frontend/widget.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/buildstream/_frontend/widget.py b/buildstream/_frontend/widget.py
index 5967b0d..c43dce6 100644
--- a/buildstream/_frontend/widget.py
+++ b/buildstream/_frontend/widget.py
@@ -368,7 +368,9 @@ class LogLine(Widget):
             if consistency == Consistency.INCONSISTENT:
                 line = p.fmt_subst(line, 'state', "no reference", fg='red')
             else:
-                if element._cached_success():
+                if element._cached_failure():
+                    line = p.fmt_subst(line, 'state', "failed", fg='red')
+                elif element._cached_success():
                     line = p.fmt_subst(line, 'state', "cached", fg='magenta')
                 elif consistency == Consistency.RESOLVED:
                     line = p.fmt_subst(line, 'state', "fetch needed", fg='red')