Prevent None from being added to the schedule from a timing issue.

This commit is contained in:
Lance Stout 2012-07-09 22:59:26 -07:00
parent 1baae1b81e
commit 99701c947e

View file

@ -172,7 +172,8 @@ class Scheduler(object):
else:
updated = True
self.schedule_lock.acquire()
self.schedule.append(newtask)
if newtask is not None:
self.schedule.append(newtask)
finally:
if updated:
self.schedule = sorted(self.schedule,