Module: check_mk
Branch: master
Commit: 33c9deeb1be65fc4162e4381714fb46ed5d3156c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=33c9deeb1be65f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Oct 10 09:22:07 2014 +0200
forms: fixed exception when a validation error in a dict happens
---
web/htdocs/forms.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/web/htdocs/forms.py b/web/htdocs/forms.py
index 972d57a..0588f19 100644
--- a/web/htdocs/forms.py
+++ b/web/htdocs/forms.py
@@ -89,8 +89,8 @@ def edit_dictionaries(dictionaries, value, focus=None, hover_help=True,
try:
new_value[keyname] = entries.from_html_vars(keyname)
entries.validate_value(new_value[keyname], keyname)
- except:
- messages.append("%s: %s" % (entries.title(), e.message))
+ except Exception, e:
+ messages.append("%s: %s" % (entries.title() or
_("Properties"), e.message))
html.add_user_error(e.varname, e.message)
if validate and not html.has_user_errors():