From ae4b361f796eb98e835cb332e26d5594a92b281d Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Thu, 7 May 2020 12:20:21 -0700 Subject: [PATCH] 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 --- autotests/util/iwd.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py index c8d11f91..b9eeb0ff 100755 --- a/autotests/util/iwd.py +++ b/autotests/util/iwd.py @@ -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