Make code compatible with python-2.6
In python 2.6 Event.wait() always returns None making condition always True.
This commit is contained in:
parent
acff89a8e9
commit
7df8918b39
|
@ -84,7 +84,10 @@ class ThreadedSegment(MultiRunnedThread):
|
||||||
def run(self):
|
def run(self):
|
||||||
if self.do_update_first:
|
if self.do_update_first:
|
||||||
start_time = monotonic()
|
start_time = monotonic()
|
||||||
while not self.shutdown_event.wait(max(self.interval - (monotonic() - start_time), self.min_sleep_time)):
|
while True:
|
||||||
|
self.shutdown_event.wait(max(self.interval - (monotonic() - start_time), self.min_sleep_time))
|
||||||
|
if self.shutdown_event.is_set():
|
||||||
|
break
|
||||||
start_time = monotonic()
|
start_time = monotonic()
|
||||||
self.set_update_value()
|
self.set_update_value()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue