summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2018-05-28 13:37:08 +0200
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2018-05-29 14:06:52 +0300
commitaa429879c5048e78647bfdf8dd0cbacaee10d358 (patch)
treec003f3f54026441012ac025b789c9eb46e404dd9 /test
parentf2638d131e0cf0b0a9cb2d2077352b21e719107f (diff)
downloadbluez-aa429879c5048e78647bfdf8dd0cbacaee10d358.tar.gz
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'
Diffstat (limited to 'test')
-rw-r--r--test/bluezutils.py4
1 files changed, 2 insertions, 2 deletions
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