aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar jesopo2019-12-12 12:10:08 +0000
committerGravatar jesopo2019-12-12 12:10:08 +0000
commit8bf6db7fe5e401604b54add1c9a1e5ebffd162cb (patch)
treee7649b487b80d19004c0b9e48a46bca1fec8361d /src
parentmore brackets in blob of math, just in case (diff)
signature
use zip() instead of enumerate() and indexing
Diffstat (limited to 'src')
-rw-r--r--src/core_modules/cron.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core_modules/cron.py b/src/core_modules/cron.py
index 40c21bd1..a1078b28 100644
--- a/src/core_modules/cron.py
+++ b/src/core_modules/cron.py
@@ -23,8 +23,7 @@ class Module(ModuleManager.BaseModule):
cron.call(event)
def _schedule_match(self, timestamp, schedule):
- for i, schedule_part in enumerate(schedule):
- timestamp_part = timestamp[i]
+ for timestamp_part, schedule_part in zip(timestamp, schedule):
if not self._schedule_match_part(timestamp_part, schedule_part):
return False
return True