Browse Source

fixed dolater sorting

Joe Shochet 21 years ago
parent
commit
2d3afd2dcc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      direct/src/task/Task.py

+ 1 - 1
direct/src/task/Task.py

@@ -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)