| Index: build/android/pylib/device/device_utils.py
|
| diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
|
| index 522bf331d67c5f9f04c1a1b6987c384887a350cb..bc1f2ab27339c25b18d03ccac517649c15017c55 100644
|
| --- a/build/android/pylib/device/device_utils.py
|
| +++ b/build/android/pylib/device/device_utils.py
|
| @@ -1843,7 +1843,7 @@
|
| }
|
|
|
| @classmethod
|
| - def parallel(cls, devices, async=False):
|
| + def parallel(cls, devices=None, async=False):
|
| """Creates a Parallelizer to operate over the provided list of devices.
|
|
|
| If |devices| is either |None| or an empty list, the Parallelizer will
|
| @@ -1860,7 +1860,9 @@
|
| A Parallelizer operating over |devices|.
|
| """
|
| if not devices:
|
| - raise device_errors.NoDevicesError()
|
| + devices = cls.HealthyDevices()
|
| + if not devices:
|
| + raise device_errors.NoDevicesError()
|
|
|
| devices = [d if isinstance(d, cls) else cls(d) for d in devices]
|
| if async:
|
| @@ -1869,14 +1871,10 @@
|
| return parallelizer.SyncParallelizer(devices)
|
|
|
| @classmethod
|
| - def HealthyDevices(cls, blacklist=None):
|
| - if not blacklist:
|
| - # TODO(jbudorick): Remove once clients pass in the blacklist.
|
| - blacklist = device_blacklist.Blacklist(device_blacklist.BLACKLIST_JSON)
|
| -
|
| - blacklisted_devices = blacklist.Read()
|
| + def HealthyDevices(cls):
|
| + blacklist = device_blacklist.ReadBlacklist()
|
| def blacklisted(adb):
|
| - if adb.GetDeviceSerial() in blacklisted_devices:
|
| + if adb.GetDeviceSerial() in blacklist:
|
| logging.warning('Device %s is blacklisted.', adb.GetDeviceSerial())
|
| return True
|
| return False
|
|
|