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

Unified Diff: build/android/incremental_install/installer.py

Issue 1895163002: 🐠 Use the new DeviceUtils.HealthyDevices(device_arg=) in a few scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/adb_reverse_forwarder.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/incremental_install/installer.py
diff --git a/build/android/incremental_install/installer.py b/build/android/incremental_install/installer.py
index 25a0295eadc4ecfad210e84557283b939465f93a..421318cf3937073fda112c9e591633cc9ad09604 100755
--- a/build/android/incremental_install/installer.py
+++ b/build/android/incremental_install/installer.py
@@ -286,27 +286,12 @@ def main():
logging.fatal(args.dont_even_try)
return 1
- if args.device:
- # Retries are annoying when commands fail for legitimate reasons. Might want
- # to enable them if this is ever used on bots though.
- device = device_utils.DeviceUtils(
- args.device, default_retries=0, enable_device_files_cache=True)
- else:
- devices = device_utils.DeviceUtils.HealthyDevices(
- default_retries=0, enable_device_files_cache=True)
- if not devices:
- raise device_errors.NoDevicesError()
- elif len(devices) == 1:
- device = devices[0]
- else:
- all_devices = device_utils.DeviceUtils.parallel(devices)
- msg = ('More than one device available.\n'
- 'Use --device=SERIAL to select a device.\n'
- 'Available devices:\n')
- descriptions = all_devices.pMap(lambda d: d.build_description).pGet(None)
- for d, desc in zip(devices, descriptions):
- msg += ' %s (%s)\n' % (d, desc)
- raise Exception(msg)
+ # Retries are annoying when commands fail for legitimate reasons. Might want
+ # to enable them if this is ever used on bots though.
+ device = device_utils.DeviceUtils.HealthyDevices(
+ device_arg=args.device,
+ default_retries=0,
+ enable_device_files_cache=True)[0]
apk = apk_helper.ToHelper(args.apk_path)
if args.uninstall:
« no previous file with comments | « build/android/adb_reverse_forwarder.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698