From bfc07e509d57b3ec572a74b9a40cbe0015c4c6aa Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Sat, 10 Nov 2012 12:05:08 +0200 Subject: [PATCH] test: Update get-managed-objects to support Python 3 --- test/get-managed-objects | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/get-managed-objects b/test/get-managed-objects index 5bbbe7d03..3156f658f 100755 --- a/test/get-managed-objects +++ b/test/get-managed-objects @@ -1,5 +1,7 @@ #!/usr/bin/python +from __future__ import absolute_import, print_function, unicode_literals + import dbus bus = dbus.SystemBus() @@ -10,7 +12,7 @@ manager = dbus.Interface(bus.get_object("org.bluez", "/"), objects = manager.GetManagedObjects() for path in objects.keys(): - print "[ %s ]" % (path) + print("[ %s ]" % (path)) interfaces = objects[path] @@ -19,9 +21,9 @@ for path in objects.keys(): "org.freedesktop.DBus.Properties"]: continue - print " %s" % (interface) + print(" %s" % (interface)) properties = interfaces[interface] for key in properties.keys(): - print " %s = %s" % (key, properties[key]) + print(" %s = %s" % (key, properties[key])) -- 2.47.3