From ec5485a5b931cf531740859faf6acbe21f87b750 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Wed, 9 May 2018 08:44:11 +0800 Subject: [PATCH] GetDevices: Also allow `\-` to be part of the host name Bug: b/79494592 Change-Id: I2e79a8389be53300296f07bcbae902a717da2d5e --- scripts/android/install_apk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/android/install_apk.py b/scripts/android/install_apk.py index a3558ee..67fc621 100644 --- a/scripts/android/install_apk.py +++ b/scripts/android/install_apk.py @@ -55,7 +55,7 @@ def getDevices (adbPath): if proc.returncode != 0: raise Exception("adb devices -l failed, got %d" % proc.returncode) - ptrn = re.compile(r'^([a-zA-Z0-9\.:]+)\s+.*product:([^\s]+)\s+model:([^\s]+)\s+device:([^\s]+)') + ptrn = re.compile(r'^([a-zA-Z0-9\.\-:]+)\s+.*product:([^\s]+)\s+model:([^\s]+)\s+device:([^\s]+)') devices = [] for line in stdout.splitlines()[1:]: if len(line.strip()) == 0: -- 2.7.4