Module: check_mk
Branch: master
Commit: 409f3c6532718a53f58c36e20498c40d756cc8f4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=409f3c6532718a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Mar 12 16:14:18 2015 +0100
Fix option onwrap=0.0 in new get_rate() function
---
modules/check_mk_base.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 81643af..c48a12e 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -976,9 +976,9 @@ def get_rate(countername, this_time, this_val, allow_negative=False,
onwrap=SKIP
timedif, rate = get_counter(countername, this_time, this_val, allow_negative)
return rate
except MKCounterWrapped, e:
- if onwrap == RAISE:
+ if onwrap is RAISE:
raise
- elif onwrap == SKIP:
+ elif onwrap is SKIP:
global g_last_counter_wrap
g_last_counter_wrap = e
return 0.0