Module: check_mk
Branch: master
Commit: fba83af2b37a6ab92101d560748b049be59b8291
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fba83af2b37a6a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Jun 24 17:16:30 2013 +0200
removed possible crash on missing service level attributes
---
modules/notify.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/notify.py b/modules/notify.py
index a50e6a1..848c1c4 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -541,9 +541,9 @@ def should_notify(context, entry):
if "match_sl" in entry:
from_sl, to_sl = entry['match_sl']
if context['WHAT'] == "SERVICE" and
context.get('SVC_SL','').isdigit():
- sl = saveint(context['SVC_SL'])
+ sl = saveint(context.get('SVC_SL'))
else:
- sl = saveint(context['HOST_SL'])
+ sl = saveint(context.get('HOST_SL'))
if sl < from_sl or sl > to_sl:
notify_log(" - Skipping: service level %d not between %d and %d" %
(sl, from_sl, to_sl))