Module: check_mk
Branch: master
Commit: d2d8060a086dd064b4ce59fc2f46a8d80de3217a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d2d8060a086dd0…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Jan 18 15:07:35 2012 +0100
FIX: Fixed encoding problems with umlauts in group aliases
---
ChangeLog | 1 +
modules/check_mk.py | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8f9f724..aa25f7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
correctly
* cmk --localize update supports an optional ALIAS which is used as
display string in the multisite GUI
+ * FIX: Fixed encoding problems with umlauts in group aliases
Checks & Agents:
* Windows agent: output eventlog texts in UTF-8 encoding. This
diff --git a/modules/check_mk.py b/modules/check_mk.py
index b099fc7..2063c73 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1782,7 +1782,7 @@ define hostgroup {
hostgroup_name\t\t%s
alias\t\t\t\t%s
}
-""" % (hg, alias))
+""" % (hg, alias.encode("utf-8")))
# No creation of host groups but we need to define
# default host group
@@ -1812,7 +1812,7 @@ define servicegroup {
servicegroup_name\t\t%s
alias\t\t\t\t%s
}
-""" % (sg, alias))
+""" % (sg, alias.encode("utf-8")))
def create_nagios_config_contactgroups(outfile):
if define_contactgroups:
@@ -1829,7 +1829,7 @@ def create_nagios_config_contactgroups(outfile):
outfile.write("\ndefine contactgroup {\n"
" contactgroup_name\t\t%s\n"
" alias\t\t\t\t%s\n"
- "}\n" % (name, alias))
+ "}\n" % (name, alias.encode("utf-8")))
def create_nagios_config_commands(outfile):