Module: check_mk
Branch: master
Commit: c9df89e592d2d0a5eecba9c92901e15b35bc28c2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c9df89e592d2d0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Nov 6 16:06:09 2015 +0100
Cleaned up output of cmk -v a bit
---
modules/check_mk_base.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 6bfce7b..a88b355 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1861,11 +1861,13 @@ def submit_check_result(host, servicedesc, result, sa,
cached_at=None, cache_int
if opt_verbose:
if opt_showperfdata:
+ infotext_fmt = "%-56s"
p = ' (%s)' % (" ".join(perftexts))
else:
p = ''
+ infotext_fmt = "%s"
color = { 0: tty_green, 1: tty_yellow, 2: tty_red, 3: tty_magenta }[state]
- print "%-20s %s%s%-56s%s%s" % (servicedesc.encode('utf-8'),
+ print ("%-20s %s%s"+infotext_fmt+"%s%s") %
(servicedesc.encode('utf-8'),
tty_bold, color,
make_utf8(infotext.split('\n')[0]),
tty_normal, make_utf8(p))