caused by empty item
Message-ID: <53ad104b.klb6D5zme/F8gEXy%mk(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: aeee49154d130ef6d453a64b86b8aa5a146638d8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=aeee49154d130e…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jun 27 08:33:33 2014 +0200
FIX Fix exception when saving rules, caused by empty item
---
.werks/1004 | 9 +++++++++
ChangeLog | 5 ++---
web/htdocs/wato.py | 5 ++++-
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/.werks/1004 b/.werks/1004
new file mode 100644
index 0000000..2d2ee9d
--- /dev/null
+++ b/.werks/1004
@@ -0,0 +1,9 @@
+Title: Fix exception when saving rules, caused by empty item
+Level: 1
+Component: wato
+Class: fix
+State: unknown
+Version: 1.2.5i5
+Date: 1403850784
+
+
diff --git a/ChangeLog b/ChangeLog
index abf9857..8fce44e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,7 +14,9 @@
* 0945 FIX: Sidebar snapin "Problem hosts": Now excludes hosts and services
in downtime
WATO:
+ * 0168 f5_bigip_pool: Added Wato configuration...
* 0990 FIX: Fix HTTP error handling in bulk inventory...
+ * 1004 FIX: Fix exception when saving rules, caused by empty item
Reporting & Availability:
* 0991 FIX: Availability: optionally show time stamps as UNIX epoch time...
@@ -22,9 +24,6 @@
Livestatus:
* 0988 FIX: livedump: Fix exception in case no contact groups are defined for a
service
- WATO:
- * 0168 f5_bigip_pool: Added Wato configuration...
-
HW/SW-Inventory:
* 0167 FIX: mk_inventory.linux: Changed field separator from pipe to tab...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 972ea68..98735a5 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -13472,7 +13472,10 @@ def mode_edit_ruleset(phase):
hostname = html.var("host", "")
if not item:
if html.has_var("item"):
- item = mk_eval(html.var("item"))
+ try:
+ item = mk_eval(html.var("item"))
+ except:
+ item = NO_ITEM
else:
item = NO_ITEM