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)
|
cron.call(event)
|
||||||
|
|
||||||
def _schedule_match(self, timestamp, schedule):
|
def _schedule_match(self, timestamp, schedule):
|
||||||
for i, schedule_part in enumerate(schedule):
|
for timestamp_part, schedule_part in zip(timestamp, schedule):
|
||||||
timestamp_part = timestamp[i]
|
|
||||||
if not self._schedule_match_part(timestamp_part, schedule_part):
|
if not self._schedule_match_part(timestamp_part, schedule_part):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue