1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00:00

AndroidTarget: Fix ps when NAME column contains spaces

Targets have been observed where `ps` output contains entries with NAME columns
of the form "[foo bar]". This means the `parts` list is too long and the PsEntry
call reports too many arguments. Since NAME is the rightmost column, just fix
the number of entries we recognise to 8.
This commit is contained in:
Brendan Jackman 2017-04-12 16:30:58 +01:00
parent 391e95cc75
commit 55c27e2c54

View File

@ -929,7 +929,7 @@ class AndroidTarget(Target):
lines.next() # header
result = []
for line in lines:
parts = line.split()
parts = line.split(None, 8)
if parts:
result.append(PsEntry(*(parts[0:1] + map(int, parts[1:5]) + parts[5:])))
if not kwargs: