fixed dolater sorting

This commit is contained in:
Joe Shochet 2004-09-04 00:53:27 +00:00
parent 454f8fd782
commit 2d3afd2dcc
1 changed files with 1 additions and 1 deletions

View File

@ -854,7 +854,7 @@ class TaskManager:
# The priority heap is not actually in order - it is a tree
# Make a shallow copy so we can sort it
sortedDoLaterList = self.__doLaterList[:]
sortedDoLaterList.sort()
sortedDoLaterList.sort(lambda a,b: cmp(a.getWakeTime(), b.getWakeTime()))
sortedDoLaterList.reverse()
for task in sortedDoLaterList:
remainingTime = ((task.getWakeTime()) - self.currentTime)