Check for the enabling/disabling python return values.
tech.SetProperty("Tethering", dbus.Boolean(0))
return tech_type
+ else:
+ return None
properties = manager.GetProperties()
if key in ["Technologies"]:
for path in properties[key]:
tech = technology_disable_tethering(path, sys.argv[1])
+ if tech != None:
+ break;
if tech == None:
print "Failed to disable %s tethering" % (sys.argv[1])
tech.SetProperty("Tethering", dbus.Boolean(1))
return tech_type
+ else:
+ return None
properties = manager.GetProperties()
tech = technology_enable_tethering(path,
sys.argv[1], "", "")
+ if tech != None:
+ break;
if tech == None:
print "Failed to enable %s tethering" % (sys.argv[1])