Module: check_mk
Branch: master
Commit: 413f142db6fc4e457231b228d9d322d644ae7140
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=413f142db6fc4e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 21 10:37:14 2011 +0200
FIX: Fix crash with Umlauts in host aliases
---
.bugs/392 | 10 +++++++---
ChangeLog | 3 +++
modules/check_mk.py | 2 +-
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/.bugs/392 b/.bugs/392
index 01be137..02e397f 100644
--- a/.bugs/392
+++ b/.bugs/392
@@ -1,10 +1,14 @@
Title: non-Ascii-Characters in host aliases via WATO make Check_MK murk
Component: wato
+State: done
+Class: bug
+Date: 2011-09-23 16:32:10
Benefit: 1
-State: open
Cost: 1
-Date: 2011-09-23 16:32:10
-Class: bug
+Fun: 0
In some cases non-Ascii characters in WATO data make
Check_MK when it creates the configuration
+
+2011-10-21 10:34:23: changed state open -> done
+That was in host aliases. It's fixed now.
diff --git a/ChangeLog b/ChangeLog
index c6bb332..cddb35d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
1.1.12b2:
+ Core, Setup, etc.:
+ * FIX: fix crash with umlauts in host aliases
+
Multisite:
* Remove Check_MK logo from default dashboard
* Let dashboard use 10 more pixels right and bottom
diff --git a/modules/check_mk.py b/modules/check_mk.py
index e69761c..ebbaadc 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1423,7 +1423,7 @@ def create_nagios_hostdefs(outfile, hostname):
outfile.write(" alias\t\t\t\t%s\n" % alias)
# Custom configuration last -> user may override all other values
- outfile.write(extra_host_conf_of(hostname))
+ outfile.write(extra_host_conf_of(hostname).encode("utf-8"))
outfile.write("}\n")