timer removal SHOULD (!!!!!!!!!!!!!!!!!!!!!!!!!!!) work now...
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 24 Nov 2005 03:44:37 +0000 (03:44 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 24 Nov 2005 03:44:37 +0000 (03:44 +0000)
RecordTimer.py

index c3b948d..e26bda6 100644 (file)
@@ -142,10 +142,12 @@ class RecordTimer(timer.Timer):
                file.close()
        
        def record(self, entry):
+               print "[Timer] Record " + str(entry)
                entry.Timer = self
                self.addTimerEntry(entry)
 
        def removeEntry(self, entry):
+               print "[Timer] Remove " + str(entry)
                if entry.state == timer.TimerEntry.StateRunning:
                        entry.end = time.time()
                        self.timeChanged(entry)
@@ -158,7 +160,10 @@ class RecordTimer(timer.Timer):
                        print "timer did already end - doing nothing."
                
                # now the timer should be in the processed_timers list. remove it from there.
-               self.processed_timers.remove(entry)
+               try:
+                       self.processed_timers.remove(entry)
+               except:
+                       pass
 
        def shutdown(self):
                self.saveTimer()