From aa429879c5048e78647bfdf8dd0cbacaee10d358 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Mon, 28 May 2018 13:37:08 +0200 Subject: test: Switch to Python3 Python2 will be maintained till end of 2019. Switch to Python3 by replacing iteritems() with items() to fix error when runnig test-nap: AttributeError: 'dbus.Dictionary' object has no attribute 'iteritems' --- test/bluezutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/bluezutils.py') diff --git a/test/bluezutils.py b/test/bluezutils.py index de08cbdcb..cd8964082 100644 --- a/test/bluezutils.py +++ b/test/bluezutils.py @@ -15,7 +15,7 @@ def find_adapter(pattern=None): def find_adapter_in_objects(objects, pattern=None): bus = dbus.SystemBus() - for path, ifaces in objects.iteritems(): + for path, ifaces in objects.items(): adapter = ifaces.get(ADAPTER_INTERFACE) if adapter is None: continue @@ -35,7 +35,7 @@ def find_device_in_objects(objects, device_address, adapter_pattern=None): if adapter_pattern: adapter = find_adapter_in_objects(objects, adapter_pattern) path_prefix = adapter.object_path - for path, ifaces in objects.iteritems(): + for path, ifaces in objects.items(): device = ifaces.get(DEVICE_INTERFACE) if device is None: continue -- cgit v1.2.1