6 if (len(sys.argv) < 3):
7 print "Usage: %s <device> <priority>" % (sys.argv[0])
10 bus = dbus.SystemBus()
12 manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
13 'org.moblin.connman.Manager')
15 properties = manager.GetProperties()
17 for path in properties["Devices"]:
18 device = dbus.Interface(bus.get_object('org.moblin.connman', path),
19 'org.moblin.connman.Device')
21 properties = device.GetProperties()
23 if properties["Interface"] != sys.argv[1]:
26 print "Setting priority %d for device %s" % (int(sys.argv[2]), path)
28 device.SetProperty("Priority", dbus.Byte(int(sys.argv[2])));