diff options
author | Diego Rondini <diego.rondini@kynetics.com> | 2022-04-19 17:09:49 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-04-19 15:32:16 -0700 |
commit | a1939bd51e0faba9a8550eea2590d99cb63a33c1 (patch) | |
tree | bf6bad910f03549967c1f9f8e919444f2876147d /test/test-health | |
parent | 832b594a25051b11345c3491dd20958c22278dfe (diff) | |
download | bluez-a1939bd51e0faba9a8550eea2590d99cb63a33c1.tar.gz |
test: changes for Python3
Remove some leftover usage of Python2 code. In particular replace
iteritems() with items() to fix the following error:
AttributeError: 'dbus.Dictionary' object has no attribute 'iteritems'
Diffstat (limited to 'test/test-health')
-rwxr-xr-x | test/test-health | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test-health b/test/test-health index d6b437ed8..3e16c415d 100755 --- a/test/test-health +++ b/test/test-health @@ -147,7 +147,7 @@ manager = dbus.Interface(bus.get_object(BUS_NAME, "/"), objects = manager.GetManagedObjects() adapters = [] -for path, ifaces in objects.iteritems(): +for path, ifaces in objects.items(): if ifaces.has_key(ADAPTER_INTERFACE): adapters.append(path) @@ -172,7 +172,7 @@ while select == None: adapter = dbus.Interface(bus.get_object(BUS_NAME, select), ADAPTER_INTERFACE) devices = [] -for path, interfaces in objects.iteritems(): +for path, interfaces in objects.items(): if "org.bluez.Device1" not in interfaces: continue properties = interfaces["org.bluez.Device1"] |