Index: build/android/provision_devices.py |
diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py |
index b366f0c14cdfc6e02f8c00c07ef29aeb998a8dd3..259bd55ab24a96f97848db8790cfaca7ec234025 100755 |
--- a/build/android/provision_devices.py |
+++ b/build/android/provision_devices.py |
@@ -50,10 +50,11 @@ class _PHASES(object): |
def ProvisionDevices(options): |
- if options.device is not None: |
- devices = [options.device] |
- else: |
- devices = device_utils.DeviceUtils.HealthyDevices() |
+ devices = device_utils.DeviceUtils.HealthyDevices() |
+ if options.device: |
+ devices = [d for d in devices if d == options.device] |
+ if not devices: |
+ raise device_errors.DeviceUnreachableError(options.device) |
parallel_devices = device_utils.DeviceUtils.parallel(devices) |
parallel_devices.pMap(ProvisionDevice, options) |