Bug 1233454 - Guard against ps timeout in devicemanagerADB.getProcessList; r=jmaher

This commit is contained in:
Geoff Brown 2015-12-18 12:17:06 -07:00
Родитель 3142590903
Коммит 9d3f18e1e3
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -323,10 +323,12 @@ class DeviceManagerADB(DeviceManager):
return data
def getProcessList(self):
ret = []
p = self._runCmd(["shell", "ps"], timeout=self.short_timeout)
if not p or not p.output or len(p.output) < 1:
return ret
# first line is the headers
p.output.pop(0)
ret = []
for proc in p.output:
els = proc.split()
# We need to figure out if this is "user pid name" or