Module: check_mk
Branch: master
Commit: 9a45dace27e9dc8de5dbbf77d1dfd9a6775626cf
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9a45dace27e9dc…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Mar 31 16:43:43 2016 +0200
3015 FIX Dump host (cmk -D): fixed exception with service descriptions containing umlauts
---
.werks/3015 | 9 +++++++++
ChangeLog | 1 +
modules/check_mk.py | 2 +-
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.werks/3015 b/.werks/3015
new file mode 100644
index 0000000..22603ba
--- /dev/null
+++ b/.werks/3015
@@ -0,0 +1,9 @@
+Title: Dump host (cmk -D): fixed exception with service descriptions containing umlauts
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.9i1
+Date: 1459435354
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 4490af2..45b87ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -114,6 +114,7 @@
* 3307 FIX: dell_poweredge_netdev: does not discover disconnected network devices any
more
* 3309 FIX: zpool_status: fixed wrong error handling...
* 3014 FIX: windows_tasks.ps1: fixed incorrect text encoding for tasks with umlauts
+ * 3015 FIX: Dump host (cmk -D): fixed exception with service descriptions containing
umlauts
Multisite:
* 3187 notification view: new filter for log command via regex
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 6670e68..012c22f 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -3823,7 +3823,7 @@ def dump_host(hostname):
def print_table(headers, colors, rows, indent = ""):
lengths = [ len(h) for h in headers ]
for row in rows:
- lengths = [ max(len(str(c)), l) for c, l in zip(row, lengths) ]
+ lengths = [ max(len(str(make_utf8(c))), l) for c, l in zip(row, lengths) ]
sumlen = sum(lengths) + len(headers)
format = indent
sep = ""