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
1 changed files with 4 additions and 1 deletions

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