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'}] |