Module: check_mk
Branch: master
Commit: 09fd09c86f610edd4188ad99997f90f66f08c02e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=09fd09c86f610e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 25 10:13:07 2013 +0200
FIX: fix encoding problem on GIT integration
---
ChangeLog | 1 +
web/htdocs/wato.py | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b34bfca..3172976 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -105,6 +105,7 @@
* FIX: fixed setting for locking mode from 'ait' to 'wait'
* FIX: avoid removal of tags from rules when not yet acknowledged
* FIX: avoid need for apache restart when adding new service levels
+ * FIX: fix encoding problem on GIT integration
Livestatus:
* Removed "livecheck". It never was really stable. Nagios4 has something
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index ac32bf7..078dae8 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -372,13 +372,14 @@ def lock_exclusive():
def git_command(args):
- command = "cd '%s' && git %s 2>&1" %
(defaults.default_config_dir, " ".join(args))
+ encoded_args = " ".join([ a.encode("utf-8") for a in args ])
+ command = "cd '%s' && git %s 2>&1" %
(defaults.default_config_dir, encoded_args)
p = os.popen(command)
output = p.read()
status = p.close()
if status != None:
raise MKGeneralException(_("Error executing GIT command %s: %s") %
- (command, output))
+ (command.decode('utf-8'), output))
def shell_quote(s):
return "'" + s.replace("'",
"'\"'\"'") + "'"