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

Unified Diff: devil/devil/utils/battor_device_mapping.py

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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 | « devil/devil/android/tools/device_status.py ('k') | devil/devil/utils/find_usb_devices.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: devil/devil/utils/battor_device_mapping.py
diff --git a/devil/devil/utils/battor_device_mapping.py b/devil/devil/utils/battor_device_mapping.py
index dd12ce5aefa3d6394d734eddb987f4d6c5b445e8..a27433249c102ec9eed4d670be043eb64c332ce7 100644
--- a/devil/devil/utils/battor_device_mapping.py
+++ b/devil/devil/utils/battor_device_mapping.py
@@ -159,15 +159,25 @@ def GenerateSerialMap(hub_types=None):
Args:
hub_types: List of hub types to check for.
- Defaults to ['plugable_7port']
+ Defaults to ['plugable_7port',
+ 'plugable_7port_usb3_part2',
+ 'plugable_7port_usb3_part3']
+ (see usb_hubs.py for details)
"""
hub_types = [usb_hubs.GetHubType(x)
- for x in hub_types or ['plugable_7port']]
+ for x in hub_types or ['plugable_7port',
+ 'plugable_7port_usb3_part2',
+ 'plugable_7port_usb3_part3']]
devtree = find_usb_devices.GetBusNumberToDeviceTreeMap()
# List of serial numbers in the system that represent BattOrs.
battor_serials = list(GetBattorSerialNumbers(devtree))
+ # If there's only one BattOr in the system, then a serial number ma
+ # is not necessary.
+ if len(battor_serials) == 1:
+ return {}
+
# List of dictionaries, one for each hub, that maps the physical
# port number to the serial number of that hub. For instance, in a 2
# hub system, this could return [{1:'ab', 2:'cd'}, {1:'jkl', 2:'xyz'}]
« no previous file with comments | « devil/devil/android/tools/device_status.py ('k') | devil/devil/utils/find_usb_devices.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698