if properties["Type"] not in ["wifi", "wimax",
"bluetooth", "cellular"]:
- continue;
+ continue
for path in properties["Networks"]:
network = dbus.Interface(bus.get_object("org.moblin.connman", path),
dev = path[path.rfind("/") + 1:]
+ if "Name" not in properties.keys():
+ continue
+
if dev == sys.argv[1] or properties["Name"] == sys.argv[1]:
print "Connecting %s" % (path)
network.Connect()
properties = device.GetProperties()
if (properties["Type"] != "wifi" and properties["Type"] != "wimax"):
- continue;
+ continue
print "[ %s ]" % (path)
properties = network.GetProperties()
- if "Name" not in properties.keys:
+ if "Name" not in properties.keys():
continue
if (properties["Connected"] == dbus.Boolean(1)):