trx_toolkit/ fix: Thread.isAlive() was removed

As it turns out, in Python < 3.9 class Thread defines 'is_alive'
and 'isAlive = is_alive'.  In Python 3.9 the later has been
removed, so crashes on receipt of 'POWEROFF':

  File "/home/wmn/wmn/osmocom/bb/src/target/trx_toolkit/",
    line 63, in running
      return self._thread.isAlive()
  AttributeError: 'Thread' object has no attribute 'isAlive'

See for more details.

Change-Id: Id441d76dddb659958803d507e0fb028fb06422a7
This commit is contained in:
Vadim Yanitskiy 2020-12-25 14:32:28 +01:00
parent 5599258b67
commit 02830f3bd2
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class CLCKGen:
def running(self):
if self._thread is None:
return False
return self._thread.isAlive()
return self._thread.is_alive()
def start(self):
# Make sure we won't start two threads