From e754a06e12636dd95906d1f9142a4d513bd3fbd7 Mon Sep 17 00:00:00 2001 From: Geoff Brown Date: Sat, 7 Jan 2012 08:25:05 -0500 Subject: [PATCH] Bug 716077 - be more strict when matching proc name in devicemanager.processExists; r=jmaher --- build/mobile/devicemanager.py | 4 ++-- build/mobile/devicemanagerSUT.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/mobile/devicemanager.py b/build/mobile/devicemanager.py index 16dc9e67af0e..1dd730c30ffb 100755 --- a/build/mobile/devicemanager.py +++ b/build/mobile/devicemanager.py @@ -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 diff --git a/build/mobile/devicemanagerSUT.py b/build/mobile/devicemanagerSUT.py index 3b1888128472..b249b50610db 100644 --- a/build/mobile/devicemanagerSUT.py +++ b/build/mobile/devicemanagerSUT.py @@ -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