(bus, hub_types)
Scans for all hubs on a bus of given hub types.

  Args:
    bus: [USBNode] Bus object.
    hub_types: [iterable(usb_hubs.HubType)] Possible types of hubs.

  Yields:
    Sequence of tuples representing (hub, type of hub)
Scans for all hubs on a bus of given hub types.
Scans for all hubs on a bus of given hub types .
def GetHubsOnBus(bus, hub_types):
  """Scans for all hubs on a bus of given hub types.

  Args:
    bus: [USBNode] Bus object.
    hub_types: [iterable(usb_hubs.HubType)] Possible types of hubs.

  Yields:
    Sequence of tuples representing (hub, type of hub)
  """
  for device in bus.AllNodes():
    for hub_type in hub_types:
      if hub_type.IsType(device):
        yield (device, hub_type)
def GetHubsOnBus ( bus , hub_types ) : for device in bus . AllNodes ( ) : for hub_type in hub_types : if hub_type . IsType ( device ) : yield ( device , hub_type )