Module: check_mk
Branch: master
Commit: c681ae684805d14b0ebbdc9fa9b2dc4f9de6be35
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c681ae684805d1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Mar 21 15:11:21 2016 +0100
3335 FIX Improved error handling when requested rule pack does not exist
---
.werks/3335 | 10 ++++++++++
ChangeLog | 1 +
mkeventd/web/plugins/wato/mkeventd.py | 1 +
3 files changed, 12 insertions(+)
diff --git a/.werks/3335 b/.werks/3335
new file mode 100644
index 0000000..740e9d8
--- /dev/null
+++ b/.werks/3335
@@ -0,0 +1,10 @@
+Title: Improved error handling when requested rule pack does not exist
+Level: 1
+Component: ec
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1458569464
+
+
diff --git a/ChangeLog b/ChangeLog
index 93604b6..33aff24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -186,6 +186,7 @@
* 3262 Event Console: bulk delete button for custom MIBs now available
* 3058 FIX: Event Console is now allowing non loadable MIB modules on startup...
* 3097 FIX: mkeventd: fixed crash with non-descriptive error message if mibs
couldn't be loaded
+ * 3335 FIX: Improved error handling when requested rule pack does not exist
Livestatus:
* 3233 FIX: Fixed shutdown of Nagios core with Livestatus module...
diff --git a/mkeventd/web/plugins/wato/mkeventd.py
b/mkeventd/web/plugins/wato/mkeventd.py
index a0c356b..1c431b6 100644
--- a/mkeventd/web/plugins/wato/mkeventd.py
+++ b/mkeventd/web/plugins/wato/mkeventd.py
@@ -1141,6 +1141,7 @@ def rule_pack_with_id(rule_packs, rule_pack_id):
for nr, entry in enumerate(rule_packs):
if entry["id"] == rule_pack_id:
return nr, entry
+ raise MKUserError(None, _("The requested rule pack does not exist."))
def mode_mkeventd_rules(phase):