Bug 716077 - be more strict when matching proc name in devicemanager.processExists; r=jmaher

This commit is contained in:
Geoff Brown 2012-01-07 18:41:08 -05:00
parent 5d75016d73
commit 2a0e06eef3
2 changed files with 4 additions and 4 deletions

View File

@ -208,14 +208,14 @@ class DeviceManager:
pieces = appname.split(' ')
parts = pieces[0].split('/')
app = parts[-1]
procre = re.compile('.*' + app + '.*')
procList = self.getProcessList()
if (procList == []):
return None
for proc in procList:
if (procre.match(proc[1])):
procName = proc[1].split('/')[-1]
if (procName == app):
pid = proc[0]
break
return pid

View File

@ -552,14 +552,14 @@ class DeviceManagerSUT(DeviceManager):
pieces = appname.split(' ')
parts = pieces[0].split('/')
app = parts[-1]
procre = re.compile('.*' + app + '.*')
procList = self.getProcessList()
if (procList == []):
return None
for proc in procList:
if (procre.match(proc[1])):
procName = proc[1].split('/')[-1]
if (procName == app):
pid = proc[0]
break
return pid