3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-19 11:09:25 +01:00

auto-t: Return None instead of empty known net list

To match the original behavior of get_ordered_networks,
return None for the empty list of known networks after the scan
is complete
This commit is contained in:
Tim Kourt 2020-05-07 12:20:21 -07:00 committed by Denis Kenzior
parent 2e5f7404c0
commit ae4b361f79

View File

@ -395,7 +395,10 @@ class Device(IWDDBusAbstract):
ordered_network = OrderedNetwork(bus_obj)
ordered_networks.append(ordered_network)
return ordered_networks
if len(ordered_networks) > 0:
return ordered_networks
return None
def get_ordered_network(self, network, scan_if_needed = False):
'''Returns a single network from ordered network call, or None if the