diff options
| author | 2019-12-12 12:10:08 +0000 | |
|---|---|---|
| committer | 2019-12-12 12:10:08 +0000 | |
| commit | 8bf6db7fe5e401604b54add1c9a1e5ebffd162cb (patch) | |
| tree | e7649b487b80d19004c0b9e48a46bca1fec8361d /src | |
| parent | more 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.py | 3 |
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 |
