oeqa/commands: Fix compatibility with python 3.9

Python 3.9 dropped isAlive() so use the preferred is_alive().

(From OE-Core rev: f101408bd43a5d41cb1710a7a848370292f84290)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9bb06428cbb2ac0f3d98a1696f050d3393385503)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2020-11-21 10:50:07 +00:00
parent 8ae5a32559
commit 3be4d4e2c3

View File

@ -125,11 +125,11 @@ class Command(object):
def stop(self):
for thread in self.threads:
if thread.isAlive():
if thread.is_alive():
self.process.terminate()
# let's give it more time to terminate gracefully before killing it
thread.join(5)
if thread.isAlive():
if thread.is_alive():
self.process.kill()
thread.join()