All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] test: Switch to Python3
@ 2018-05-28 11:16 Krzysztof Kozlowski
  2018-05-29 11:39 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2018-05-28 11:16 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Krzysztof Kozlowski

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/bluezutils.py b/test/bluezutils.py
index de08cbdcb712..afbadfecd214 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
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH BlueZ] test: Switch to Python3
  2018-05-28 11:16 [PATCH BlueZ] test: Switch to Python3 Krzysztof Kozlowski
@ 2018-05-29 11:39 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 2+ messages in thread
From: Luiz Augusto von Dentz @ 2018-05-29 11:39 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: linux-bluetooth

Hi Krzysztof,

On Mon, May 28, 2018 at 2:16 PM, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> 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 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/bluezutils.py b/test/bluezutils.py
> index de08cbdcb712..afbadfecd214 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
> --
> 2.7.4

Applied, thanks.

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-29 11:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-28 11:16 [PATCH BlueZ] test: Switch to Python3 Krzysztof Kozlowski
2018-05-29 11:39 ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.