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.
This commit is contained in:
Thomas Haller
2015-01-05 13:50:56 +01:00
parent 66ced4de56
commit 954c744bc0

View File

@@ -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):