From 3f61b9792b1d2dbffbe58ef288f4e15369551c34 Mon Sep 17 00:00:00 2001 From: Oleg Sklyarov Date: Wed, 10 Oct 2012 16:59:00 +0400 Subject: [PATCH] fixed bug #2407: run.py now understands android device names with spaces --- modules/ts/misc/run.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ts/misc/run.py b/modules/ts/misc/run.py index 09db7dc791..e1b275f321 100644 --- a/modules/ts/misc/run.py +++ b/modules/ts/misc/run.py @@ -265,7 +265,8 @@ class RunInfo(object): self.error = "Could not run adb command: %s (for %s)" % (self.error, self.path) self.adb = [] else: - connected_devices = re.findall(r"^[^ \t]+[ \t]+device\r?$", adb_res, re.MULTILINE) + # assume here that device name may consists of any characters except newline + connected_devices = re.findall(r"^[^\n]+[ \t]+device\r?$", adb_res, re.MULTILINE) if len(connected_devices) != 1: self.error = "Too many (%s) devices are connected. Please specify single device using --serial option" % (len(connected_devices)) self.adb = []