Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: Tim Kourt <tim.a.kourt@linux.intel.com>
To: iwd@lists.01.org
Subject: [PATCH 3/5] auto-t: Return None instead of empty known net list
Date: Thu, 07 May 2020 12:20:21 -0700	[thread overview]
Message-ID: <20200507192023.11498-3-tim.a.kourt@linux.intel.com> (raw)
In-Reply-To: <20200507192023.11498-1-tim.a.kourt@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]

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
-- 
2.13.6

  parent reply	other threads:[~2020-05-07 19:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 19:20 [PATCH 1/5] auto-t: Remove unnecessary disconnect calls Tim Kourt
2020-05-07 19:20 ` [PATCH 2/5] auto-t: Rename test case to reflect its purpose Tim Kourt
2020-05-07 19:20 ` Tim Kourt [this message]
2020-05-07 19:20 ` [PATCH 4/5] auto-t: Use changed get_ordered_network API Tim Kourt
2020-05-07 19:20 ` [PATCH 5/5] auto-t: Remove bogus logic Tim Kourt
2020-05-07 19:58 ` [PATCH 1/5] auto-t: Remove unnecessary disconnect calls Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200507192023.11498-3-tim.a.kourt@linux.intel.com \
    --to=tim.a.kourt@linux.intel.com \
    --cc=iwd@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox