Module: check_mk
Branch: master
Commit: 389fa488fa8c20004c6652db167a1b5891030d35
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=389fa488fa8c20…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Feb 17 11:57:31 2016 +0100
Fixed broken debug error handling in case of notification rules can not be loaded
---
web/htdocs/wato.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index cb51ddb..158112a 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -6929,6 +6929,7 @@ def load_notification_rules():
filename = wato_root_dir + "notifications.mk"
if not os.path.exists(filename):
return []
+
try:
vars = { "notification_rules" : [] }
execfile(filename, vars, vars)
@@ -6941,7 +6942,7 @@ def load_notification_rules():
del rule["notify_method"]
rule["notify_plugin"] = ( plugin, method )
return notification_rules
- except:
+ except Exception, e:
if config.debug:
raise MKGeneralException(_("Cannot read configuration file %s: %s"
%
(filename, e)))