Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: build/android/pylib/device/device_utils.py

Issue 944673002: [Android] Raise NoDevicesError in DeviceUtils.parallel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Provides a variety of device interactions based on adb. 5 """Provides a variety of device interactions based on adb.
6 6
7 Eventually, this will be based on adb_wrapper. 7 Eventually, this will be based on adb_wrapper.
8 """ 8 """
9 # pylint: disable=unused-argument 9 # pylint: disable=unused-argument
10 10
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1421 from which DeviceUtils instances can be constructed. If None, 1421 from which DeviceUtils instances can be constructed. If None,
1422 all attached devices will be used. 1422 all attached devices will be used.
1423 async: If true, returns a Parallelizer that runs operations 1423 async: If true, returns a Parallelizer that runs operations
1424 asynchronously. 1424 asynchronously.
1425 1425
1426 Returns: 1426 Returns:
1427 A Parallelizer operating over |devices|. 1427 A Parallelizer operating over |devices|.
1428 """ 1428 """
1429 if not devices: 1429 if not devices:
1430 devices = adb_wrapper.AdbWrapper.GetDevices() 1430 devices = adb_wrapper.AdbWrapper.GetDevices()
1431 if not devices:
1432 raise device_errors.NoDevicesError()
1431 devices = [d if isinstance(d, cls) else cls(d) for d in devices] 1433 devices = [d if isinstance(d, cls) else cls(d) for d in devices]
1432 if async: 1434 if async:
1433 return parallelizer.Parallelizer(devices) 1435 return parallelizer.Parallelizer(devices)
1434 else: 1436 else:
1435 return parallelizer.SyncParallelizer(devices) 1437 return parallelizer.SyncParallelizer(devices)
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698