diff options
Diffstat (limited to 'hcid')
-rwxr-xr-x | hcid/simple-agent | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hcid/simple-agent b/hcid/simple-agent index 80d92d45..6a3a4abd 100755 --- a/hcid/simple-agent +++ b/hcid/simple-agent @@ -59,8 +59,12 @@ class Agent(dbus.service.Object): def Cancel(self): print "Cancel" -def create_device_reply(reply): - print "New device (%s)" % (reply) +def create_device_reply(device): + print "New device (%s)" % (device) + sys.exit(0) + +def create_device_error(error): + print "Creating device failed: %s" % (error) sys.exit(0) if __name__ == '__main__': @@ -90,7 +94,7 @@ if __name__ == '__main__': adapter.CreatePairedDevice(sys.argv[2], path, "DisplayOnly", reply_handler=create_device_reply, - error_handler=create_device_reply) + error_handler=create_device_error) else: adapter.RegisterAgent(path, "DisplayOnly") print "Agent registered" |