From 02830f3bd247ccfe0421782d957d08ebc235f1c6 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 25 Dec 2020 14:32:28 +0100 Subject: trx_toolkit/clck_gen.py: 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 fake_trx.py crashes on receipt of 'POWEROFF': File "/home/wmn/wmn/osmocom/bb/src/target/trx_toolkit/clck_gen.py", line 63, in running return self._thread.isAlive() AttributeError: 'Thread' object has no attribute 'isAlive' See https://bugs.python.org/issue35283 for more details. Change-Id: Id441d76dddb659958803d507e0fb028fb06422a7 --- src/target/trx_toolkit/clck_gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/trx_toolkit/clck_gen.py b/src/target/trx_toolkit/clck_gen.py index 7232f740..51f04a82 100755 --- a/src/target/trx_toolkit/clck_gen.py +++ b/src/target/trx_toolkit/clck_gen.py @@ -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 -- cgit v1.2.3