test: Update simple-agent to new API

The method org.bluez.Device.Pair() doesn't have arguments anymore. This
commit fixes the following error:

  $ test/simple-agent hci0 4C:B1:99:F1:BC:E9
  Agent registered
  ERROR:dbus.connection:Unable to set arguments (u'/test/agent', u'Keybo
  ardDisplay') according to signature '': <type 'exceptions.TypeError'>:
   Fewer items found in D-Bus signature than in Python arguments
  Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 586
  , in msg_reply_handler
      reply_handler(*message.get_args_list(**get_args_opts))
    File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 391, i
  n _introspect_reply_handler
      self._introspect_execute_queue()
    File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 378, i
  n _introspect_execute_queue
      proxy_method(*args, **keywords)
    File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 132, i
  n __call__
      **keywords)
    File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 566
  , in call_async
      message.append(signature=signature, *args)
  TypeError: Fewer items found in D-Bus signature than in Python argumen
  ts
This commit is contained in:
João Paulo Rechi Vita 2012-12-17 19:48:20 -03:00 committed by Marcel Holtmann
parent bea034e821
commit 7d93368c38

View File

@ -169,9 +169,7 @@ if __name__ == '__main__':
options.adapter_pattern)
dev_path = device.object_path
agent.set_exit_on_release(False)
device.Pair(path, capability, timeout=options.timeout,
reply_handler=pair_reply,
error_handler=pair_error)
device.Pair(reply_handler=pair_reply, error_handler=pair_error)
device_obj = device
else:
manager.RequestDefault()