mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 716077 - be more strict when matching proc name in devicemanager.processExists; r=jmaher
This commit is contained in:
parent
5d75016d73
commit
2a0e06eef3
@ -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