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

This commit is contained in:
Geoff Brown 2012-01-07 08:25:05 -05:00
parent c6292f1fc8
commit e754a06e12
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