commit: 8482a88e8dfa3acf67d9bf4df4d3588ed993bb96
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 10 11:38:07 2015 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Feb 11 07:58:27 2015 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8482a88e
repoman: mark errors with explicit '[fatal']
Mark fatal check results with explicit '[fatal]' marker to ease grepping
and provide the additional information on non-colorful terminals
as well.
---
pym/repoman/utilities.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py
index 415825e..a2535f0 100644
--- a/pym/repoman/utilities.py
+++ b/pym/repoman/utilities.py
@@ -310,11 +310,16 @@ def format_qa_output(formatter, stats, fails, dofull,
dofail, options, qawarning
# we only want key value pairs where value > 0
for category, number in \
filter(lambda myitem: myitem[1] > 0, sorted(stats.items())):
- formatter.add_literal_data(" " + category.ljust(30))
+ formatter.add_literal_data(" " + category)
+ spacing_width = 30 - len(category)
if category in qawarnings:
formatter.push_style("WARN")
else:
formatter.push_style("BAD")
+ formatter.add_literal_data(" [fatal]")
+ spacing_width -= 8
+
+ formatter.add_literal_data(" " * spacing_width)
formatter.add_literal_data("%s" % number)
formatter.pop_style()
formatter.add_line_break()