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

Unified Diff: build/android/adb_reverse_forwarder.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_install_apk.py ('k') | build/android/incremental_install/installer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/adb_reverse_forwarder.py
diff --git a/build/android/adb_reverse_forwarder.py b/build/android/adb_reverse_forwarder.py
index d3da6fe2b2c8ba2bd8f4361109d7c3df7c50fa3c..e3a7b504d762da48819d0fbc67ea399ed738cfa8 100755
--- a/build/android/adb_reverse_forwarder.py
+++ b/build/android/adb_reverse_forwarder.py
@@ -11,7 +11,6 @@ i.e., "adb forward" in reverse. Requires |host_forwarder| and |device_forwarder|
to be built.
"""
-import logging
import optparse
import sys
import time
@@ -19,7 +18,6 @@ import time
import devil_chromium
from devil.android import device_blacklist
-from devil.android import device_errors
from devil.android import device_utils
from devil.android import forwarder
from devil.utils import run_tests_helper
@@ -63,18 +61,8 @@ def main(argv):
blacklist = (device_blacklist.Blacklist(options.blacklist_file)
if options.blacklist_file
else None)
- devices = device_utils.DeviceUtils.HealthyDevices(blacklist)
-
- if options.device:
- device = next((d for d in devices if d == options.device), None)
- if not device:
- raise device_errors.DeviceUnreachableError(options.device)
- elif devices:
- device = devices[0]
- logging.info('No device specified. Defaulting to %s', devices[0])
- else:
- raise device_errors.NoDevicesError()
-
+ device = device_utils.DeviceUtils.HealthyDevices(blacklist=blacklist,
+ device_arg=options.device)
constants.SetBuildType(options.build_type)
try:
forwarder.Forwarder.Map(port_pairs, device)
« no previous file with comments | « build/android/adb_install_apk.py ('k') | build/android/incremental_install/installer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698