[ooni-probe/master] [hotfix] Only release the lock if it is locked

13 Jan
2017
13 Jan
'17
12:39 p.m.
commit 8cc1e691df2d481157e7d023c894eb9623fbe524 Author: Arturo Filastò <arturo@filasto.net> Date: Wed Dec 7 13:15:15 2016 +0000 [hotfix] Only release the lock if it is locked --- ooni/agent/scheduler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ooni/agent/scheduler.py b/ooni/agent/scheduler.py index bda8510..262062e 100644 --- a/ooni/agent/scheduler.py +++ b/ooni/agent/scheduler.py @@ -88,7 +88,8 @@ class ScheduledTask(object): ) def cancel(self): - self._last_run_lock.release() + if self._last_run_lock.locked: + self._last_run_lock.release() @property def should_run(self):
3091
Age (days ago)
3091
Last active (days ago)
0 comments
1 participants
participants (1)
-
art@torproject.org