Module: check_mk
Branch: master
Commit: a75cc96128ed1afe83df3e30acdd9bba206d6ace
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a75cc96128ed1a…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Apr 27 08:16:43 2018 +0200
Fixed arguments. Alaways raise exception.
Change-Id: Ibf2a55f10dd730b0a919495f526f17be7d5085ce
---
cmk/ec/main.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/cmk/ec/main.py b/cmk/ec/main.py
index f700f18..1b81f07 100644
--- a/cmk/ec/main.py
+++ b/cmk/ec/main.py
@@ -583,11 +583,10 @@ class TimePeriods(object):
self._last_update = int(time.time()) / 60
except Exception as e:
logger.exception("Cannot update timeperiod information: %s" % e)
- if settings.options.debug:
- raise
+ raise
def check(self, tpname):
- self._update(settings)
+ self._update()
if not self._periods:
logger.warning("no timeperiod information, assuming %s is active" %
tpname)
return True
@@ -2425,7 +2424,7 @@ class EventServer(ECServerThread):
return True
def event_rule_matches_timeperiod(self, rule, event):
- if "match_timeperiod" in rule and not
self._time_periods.check(self.settings, rule["match_timeperiod"]):
+ if "match_timeperiod" in rule and not
self._time_periods.check(rule["match_timeperiod"]):
if self._config["debug_rules"]:
self.logger.info(" did not match, because timeperiod %s is not
active" % rule["match_timeperiod"])
return False