summaryrefslogtreecommitdiffstats
path: root/test/test-push-notification
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2014-03-11 17:39:18 +0100
committerDenis Kenzior <denkenz@gmail.com>2014-03-11 19:32:18 -0500
commit0c1fcd2b50908bda607fce70c796033e33832b11 (patch)
tree05af7c047cdb39229efd344bba4aa2198ea9105c /test/test-push-notification
parentc54e4763f8f4f6239a778994cf68f077ad2b170d (diff)
downloadofono-0c1fcd2b50908bda607fce70c796033e33832b11.tar.bz2
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.
Diffstat (limited to 'test/test-push-notification')
-rwxr-xr-xtest/test-push-notification8
1 files changed, 4 insertions, 4 deletions
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()