auto-t: iwd.py: fix full_scan argument

This was not being properly honored when existing networks were
already populated. This poses an issue for any test which uses
full_scan after setting radio values such as signal strength.
This commit is contained in:
James Prestwood 2022-03-28 10:28:33 -07:00 committed by Denis Kenzior
parent 327f719f91
commit 6e608b14f5
1 changed files with 10 additions and 9 deletions

View File

@ -492,17 +492,18 @@ class Device(IWDDBusAbstract):
main sorting factor.
'''
ordered_networks = []
for bus_obj in self._station.GetOrderedNetworks():
ordered_network = OrderedNetwork(bus_obj, self._bus, self._namespace)
ordered_networks.append(ordered_network)
if not full_scan:
for bus_obj in self._station.GetOrderedNetworks():
ordered_network = OrderedNetwork(bus_obj, self._bus, self._namespace)
ordered_networks.append(ordered_network)
names = [x.name for x in ordered_networks]
names = [x.name for x in ordered_networks]
# all() will always return true if 'list' is empty
if all(x in names for x in list) and len(names) > 0:
return ordered_networks
elif not scan_if_needed:
return None
# all() will always return true if 'list' is empty
if all(x in names for x in list) and len(names) > 0:
return ordered_networks
elif not scan_if_needed:
return None
condition = 'not obj.scanning'
IWD._wait_for_object_condition(self, condition)