3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-05 03:29:24 +01:00
iwd/test/list-known-networks

22 lines
478 B
Plaintext
Raw Normal View History

2016-07-14 02:38:08 +02:00
#!/usr/bin/python3
import sys
import dbus
bus = dbus.SystemBus()
kn = dbus.Interface(bus.get_object("net.connman.iwd", "/"),
"net.connman.iwd.KnownNetworks")
if len(sys.argv) >= 4 and sys.argv[1] == 'forget':
kn.ForgetNetwork(sys.argv[2], sys.argv[3])
print('Known Networks:')
for network in kn.ListKnownNetworks():
print("[ %s ]" % network['Name'])
for key in network:
val = network[key]
print(" %s = %s" % (key, val))