Remove logic for psutil < 2.0

... because the minimum version is now 3.2.2.

Also the children method returns a list so we don't have to cast it
to a list explicitly.

Change-Id: I59c1a7847c5b4cc8471884671e57f3e49e4573d8
This commit is contained in:
Takashi Kajinami 2023-11-28 00:19:46 +09:00
parent 812905b54b
commit 6cd51c6f79

View File

@ -60,13 +60,7 @@ PHASES = ['pre-configure',
def timeout():
p = psutil.Process()
try:
# psutils version >= 2
children = list(p.children(recursive=True))
except AttributeError:
children = list(p.get_children(recursive=True))
for child in children:
for child in p.children(recursive=True):
child.kill()