]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/commands: Fix compatibility with python 3.9
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 21 Nov 2020 10:50:07 +0000 (10:50 +0000)
committerSteve Sakoman <steve@sakoman.com>
Thu, 4 Mar 2021 14:19:50 +0000 (04:19 -1000)
Python 3.9 dropped isAlive() so use the preferred is_alive().

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9bb06428cbb2ac0f3d98a1696f050d3393385503)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/utils/commands.py

index 8b3e12038d1a6973e3a1273ef64ff0fffe958cdd..a71c16ab1494c8a862c0f6b10a8f2466e38289c7 100644 (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()