Skip to content

Commit

Permalink
Fixed bug in Delay (caught by Travis)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuomas2 committed Jul 7, 2015
1 parent d46a4a2 commit 57dcbe2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion automate/callables/builtin_callables.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,14 @@ def cancel(self, caller):
def _run(self, caller, timer, **kwargs):
self.logger.info("Time is up, running %s", self)
for i in self.objects:
if not caller in self.state:
# cancelled
return
self.call_eval(i, caller, **kwargs)

with self._lock:
self.get_state(caller).timers.remove(timer)
if caller in self.state: # if not cancelled
self.get_state(caller).timers.remove(timer)
return True


Expand Down

0 comments on commit 57dcbe2

Please sign in to comment.