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:
@@ -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):
|
||||
|
Reference in New Issue
Block a user