mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 716077 - be more strict when matching proc name in devicemanager.processExists; r=jmaher
This commit is contained in:
parent
c6292f1fc8
commit
e754a06e12
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user