Prevent None from being added to the schedule from a timing issue.
This commit is contained in:
parent
1baae1b81e
commit
99701c947e
1 changed files with 2 additions and 1 deletions
|
@ -172,7 +172,8 @@ class Scheduler(object):
|
||||||
else:
|
else:
|
||||||
updated = True
|
updated = True
|
||||||
self.schedule_lock.acquire()
|
self.schedule_lock.acquire()
|
||||||
self.schedule.append(newtask)
|
if newtask is not None:
|
||||||
|
self.schedule.append(newtask)
|
||||||
finally:
|
finally:
|
||||||
if updated:
|
if updated:
|
||||||
self.schedule = sorted(self.schedule,
|
self.schedule = sorted(self.schedule,
|
||||||
|
|
Loading…
Reference in a new issue