Module: check_mk
Branch: master
Commit: 44b2530d860a6abc6075ee896960d951adc1cf2f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=44b2530d860a6a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Jul 16 10:50:21 2015 +0200
#2467 FIX Fixed encoding exception occuring in localized GUI when a WATO action triggers
an error message
For example this could happen when using the German localization and one deletes a contact
group which
still has contacts assigned. This could also happen for other actions like host- or
service group
management.
---
.werks/2467 | 12 ++++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 4 ++--
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/2467 b/.werks/2467
new file mode 100644
index 0000000..32c00ea
--- /dev/null
+++ b/.werks/2467
@@ -0,0 +1,12 @@
+Title: Fixed encoding exception occuring in localized GUI when a WATO action triggers an
error message
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1437036533
+
+For example this could happen when using the German localization and one deletes a
contact group which
+still has contacts assigned. This could also happen for other actions like host- or
service group
+management.
diff --git a/ChangeLog b/ChangeLog
index 6c62134..9d10343 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -90,6 +90,7 @@
* 2461 FIX: Service Discovery: Hiding action buttons to rules when user is not
permitted to rulesets
* 2464 FIX: UDP ports for SNMP communication can now be configured via WATO
* 2466 FIX: Fixed exception when searching for rulesets / global settings using
special characters like umlauts
+ * 2467 FIX: Fixed encoding exception occuring in localized GUI when a WATO action
triggers an error message...
Notifications:
* 2313 FIX: notification bulking: fixed exception for plugins which are not
configured with checkboxes, e.g. sms
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 5217c60..a202509 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -265,8 +265,8 @@ def page_handler():
config.need_permission(pname)
except MKUserError, e:
- action_message = str(e)
- html.add_user_error(e.varname, str(e))
+ action_message = "%s" % e
+ html.add_user_error(e.varname, action_message)
except MKAuthException, e:
action_message = e.reason