summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-01-05 13:50:56 +0100
committerThomas Haller <thaller@redhat.com>2015-01-05 14:18:53 +0100
commit954c744bc0ac1b3260c0dfedb4ee7da8c29cb964 (patch)
tree3646fd1daf841420e11a718d90a45d7630cacb9e
parent66ced4de564bc26e4799147dcce6fbbe1b430181 (diff)
downloadNetworkManager-954c744bc0ac1b3260c0dfedb4ee7da8c29cb964.tar.gz
libnm/tests: fix GetAccessPoints() in test-networkmanager-service.py for hidden APs
There was a bug checking for "if a.ssid():". Refactor the whole line to use a list comprehension.
-rwxr-xr-xtools/test-networkmanager-service.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py
index c3c2347138..50803c8871 100755
--- a/tools/test-networkmanager-service.py
+++ b/tools/test-networkmanager-service.py
@@ -356,11 +356,7 @@ class WifiDevice(Device):
@dbus.service.method(dbus_interface=IFACE_WIFI, in_signature='', out_signature='ao')
def GetAccessPoints(self):
# only include non-hidden APs
- array = []
- for a in self.aps:
- if a.ssid():
- array.append(a)
- return to_path_array(array)
+ return to_path_array([a for a in self.aps if a.ssid])
@dbus.service.method(dbus_interface=IFACE_WIFI, in_signature='', out_signature='ao')
def GetAllAccessPoints(self):