Merge pull request #160 from cuu/master

bluetooth on gs dev_connect bug fix
This commit is contained in:
GNU 2019-01-22 10:37:52 +08:00 committed by GitHub
commit 7ae4303d58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,12 @@ class BleAgent(dbus.service.Object):
global BUS_NAME
dev = dbus.Interface(bus.get_object(BUS_NAME, path),
"org.bluez.Device1")
dev.Connect()
print("dev_connect %s" % path)
try:
dev.Connect()
except Exception,e:
print(str(e))
@dbus.service.method(AGENT_INTERFACE,in_signature="", out_signature="")
def Release(self):