use zip() instead of enumerate() and indexing
This commit is contained in:
parent
e58e5e0691
commit
8bf6db7fe5
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue