mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
oeqa/commands: Fix compatibility with python 3.9
Python 3.9 dropped isAlive() so use the preferred is_alive(). (From OE-Core rev: 9bb06428cbb2ac0f3d98a1696f050d3393385503) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -125,11 +125,11 @@ class Command(object):
|
|||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
for thread in self.threads:
|
for thread in self.threads:
|
||||||
if thread.isAlive():
|
if thread.is_alive():
|
||||||
self.process.terminate()
|
self.process.terminate()
|
||||||
# let's give it more time to terminate gracefully before killing it
|
# let's give it more time to terminate gracefully before killing it
|
||||||
thread.join(5)
|
thread.join(5)
|
||||||
if thread.isAlive():
|
if thread.is_alive():
|
||||||
self.process.kill()
|
self.process.kill()
|
||||||
thread.join()
|
thread.join()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user