sys.exit(1)
def print_services(services):
- for path in services:
- service = dbus.Interface(bus.get_object("net.connman", path),
- "net.connman.Service")
-
- properties = service.GetProperties()
-
+ for path, properties in services:
identifier = path[path.rfind("/") + 1:]
if properties["Favorite"] == dbus.Boolean(1):
print "System is %s" % (properties["State"])
elif sys.argv[1] in ["services", "list", "show"]:
- properties = manager.GetProperties()
-
- print_services(properties["Services"])
+ print_services(manager.GetServices())
elif sys.argv[1] in ["autoconnect", "autoconn"]:
if (len(sys.argv) < 3):