6 if (len(sys.argv) < 2):
7 print "Usage: %s type" % (sys.argv[0])
11 manager = dbus.Interface(bus.get_object('net.connman', "/"),
12 'net.connman.Manager')
14 def technology_disable_tethering(path, tech_type):
15 tech = dbus.Interface(bus.get_object("net.connman", path),
16 "net.connman.Technology")
18 properties = tech.GetProperties()
20 for key in properties.keys():
22 if properties[key] == tech_type:
23 print "Disabling %s tethering" % tech_type
24 tech.SetProperty("Tethering", dbus.Boolean(0))
30 properties = manager.GetProperties()
32 for key in properties.keys():
33 if key in ["Technologies"]:
34 for path in properties[key]:
35 tech = technology_disable_tethering(path, sys.argv[1])
40 print "Failed to disable %s tethering" % (sys.argv[1])