Skip to content

Commit

Permalink
pep8 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
WoLfulus committed Jun 28, 2015
1 parent 275a782 commit 5677b5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion schedule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ def _schedule_next_run(self):
# at the specified time *today* (or *this hour*) as well
if not self.last_run:
now = datetime.datetime.now()
if self.unit == 'days' and self.at_time > now.time() and self.interval == 1:
if (self.unit == 'days' and self.at_time > now.time() and
self.interval == 1):
self.next_run = self.next_run - datetime.timedelta(days=1)
elif self.unit == 'hours' and self.at_time.minute > now.minute:
self.next_run = self.next_run - datetime.timedelta(hours=1)
Expand Down

0 comments on commit 5677b5c

Please sign in to comment.