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

Unified Diff: appengine/third_party/python-adb/adb/contrib/high.py

Issue 2618043002: swarming: Roll py-adb to 75477ebf4fb8b906707f35e5fb385a9203256bef (Closed)
Patch Set: Created 3 years, 11 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 | « appengine/third_party/python-adb/adb/common.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/third_party/python-adb/adb/contrib/high.py
diff --git a/appengine/third_party/python-adb/adb/contrib/high.py b/appengine/third_party/python-adb/adb/contrib/high.py
index f1946d7fad1914ea99c240b2e4f96710983efbd9..d5127c38dead4cc3f83a0fce574dc8f4563df2b9 100644
--- a/appengine/third_party/python-adb/adb/contrib/high.py
+++ b/appengine/third_party/python-adb/adb/contrib/high.py
@@ -302,10 +302,15 @@ def GetLocalDevices(
with _ADB_KEYS_LOCK:
if not _ADB_KEYS:
return []
+
+ # Skip devices that don't expose a serial number.
+ device_matcher = lambda device: device.serial_number is not None
+
# Create unopened handles for all usb devices.
handles = list(
common.UsbHandle.FindDevicesSafe(
- adb_commands_safe.DeviceIsAvailable, timeout_ms=default_timeout_ms))
+ adb_commands_safe.DeviceIsAvailable, timeout_ms=default_timeout_ms,
+ device_matcher=device_matcher))
return _ConnectFromHandles(handles, banner=banner,
default_timeout_ms=default_timeout_ms,
« no previous file with comments | « appengine/third_party/python-adb/adb/common.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698