fix check_schedule
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Sun, 6 Oct 2013 00:02:41 +0000 (20:02 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Sun, 6 Oct 2013 00:02:41 +0000 (20:02 -0400)
planetstack/observer/event_loop.py

index 482c5a8..f67e2eb 100644 (file)
@@ -176,7 +176,7 @@ class PlanetStackObserver:
                self.last_run_times[step.__name__]=time.time()
 
        def check_schedule(self, step):
-               time_since_last_run = time.time() - self.last_run_times[step.__name__]
+               time_since_last_run = time.time() - self.last_run_times.get(step.__name__, 0)
                try:
                        if (time_since_last_run < step.requested_interval):
                                raise StepNotReady