From d6eef88b0d2be44046ac72a88c25bdbf25738e09 Mon Sep 17 00:00:00 2001 From: gjr80 Date: Sat, 23 Apr 2016 11:33:51 +1000 Subject: [PATCH] Fix yet another logic error in DOM/DOW handling --- bin/user/cronparse.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/user/cronparse.py b/bin/user/cronparse.py index d7e591fa..1eaf418d 100644 --- a/bin/user/cronparse.py +++ b/bin/user/cronparse.py @@ -259,6 +259,7 @@ class ReportCron(object): # Iterate over each field and check if it will prevent # triggering. Remember, we only need a match on either DOM or # DOW but all other fields must match. + dom_match = False dom_restricted_match = False for period, field, field_span, decode in element_tuple: if period in decode: @@ -266,10 +267,9 @@ class ReportCron(object): if field_span == DOM: # we have a match on DOM but we need to know if it # was a match on a restricted DOM field + dom_match = True dom_restricted_match = self.dom_restrict - elif field_span == DOW and not self.dow_restrict and not dom_restricted_match: - # we matched on DOW but DOW was '*' and we did not - # have a restricted DOM match so it does not count + elif field_span == DOW and not(dom_restricted_match or self.dow_restrict or dom_match): break continue elif field_span == DOW and dom_restricted_match or field_span == DOM: