From 0c1fcd2b50908bda607fce70c796033e33832b11 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 11 Mar 2014 17:39:18 +0100 Subject: test: Make print calls compatible with Python 3 Turn print calls into print() function calls and avoid using comma-separated arguments, so that they work and look the same with both Python 2 and 3. --- test/test-push-notification | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/test-push-notification') diff --git a/test/test-push-notification b/test/test-push-notification index 11d384cd..d05ec35c 100755 --- a/test/test-push-notification +++ b/test/test-push-notification @@ -11,16 +11,16 @@ class PushNotificationAgent(dbus.service.Object): @dbus.service.method("org.ofono.PushNotificationAgent", in_signature="", out_signature="") def Release(self): - print "Release" + print("Release") mainloop.quit() @dbus.service.method("org.ofono.PushNotificationAgent", in_signature="aya{sv}", out_signature="") def ReceiveNotification(self, data, props): for key in props.keys(): - print "Key: %s, Value: %s" % (key, props[key]) + print("Key: %s, Value: %s" % (key, props[key])) - print "Received notification of size: %d" % len(data) + print("Received notification of size: %d" % len(data)) if __name__ == '__main__': dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) @@ -41,7 +41,7 @@ if __name__ == '__main__': path = "/test/agent" agent = PushNotificationAgent(bus, path) pn.RegisterAgent(path) - print "Agent registered" + print("Agent registered") mainloop = gobject.MainLoop() -- cgit v1.2.3