Skip to content
Snippets Groups Projects
Commit 4fcba5db authored by Frédéric Dalleau's avatar Frédéric Dalleau :sun_with_face:
Browse files

bluez: Fix dictionnary key usage


This syntax is wrong, it generates the following error:
File "/usr/lib/python3/dist-packages/apertis_tests_lib/bluez.py", line
  557, in __show_menu
      name = str(i['org.bluez.Device1'].get(['Name'], address))
      TypeError: unhashable type: 'list'

Signed-off-by: default avatarFrédéric Dalleau <frederic.dalleau@collabora.co.uk>
Differential Revision: https://phabricator.apertis.org/D4340
parent d55db92d
No related branches found
No related tags found
No related merge requests found
......@@ -554,7 +554,7 @@ class AdapterDeviceTester():
i['org.bluez.Device1']['Adapter'] == \
self.__adapter_obj.object_path:
address = str(i['org.bluez.Device1']['Address'])
name = str(i['org.bluez.Device1'].get(['Name'], address))
name = str(i['org.bluez.Device1'].get('Name', address))
print('%s: %s, %s' % (p, address, name))
device_path = input("Select one device to pair with: ")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment