summaryrefslogtreecommitdiffstats
path: root/test/test-smart-messaging
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-smart-messaging
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-smart-messaging')
-rwxr-xr-xtest/test-smart-messaging16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/test-smart-messaging b/test/test-smart-messaging
index 0a37ba14..6d5d44b1 100755
--- a/test/test-smart-messaging
+++ b/test/test-smart-messaging
@@ -11,34 +11,34 @@ class SmartMessagingAgent(dbus.service.Object):
@dbus.service.method("org.ofono.SmartMessagingAgent",
in_signature="", out_signature="")
def Release(self):
- print "Release"
+ print("Release")
mainloop.quit()
@dbus.service.method("org.ofono.SmartMessagingAgent",
in_signature="aya{sv}", out_signature="")
def ReceiveBusinessCard(self, data, props):
for key in props.keys():
- print "Key: %s, Value: %s" % (key, props[key])
+ print("Key: %s, Value: %s" % (key, props[key]))
string = ""
for byte in data:
string += str(byte)
- print "Received Business Card:"
- print string
+ print("Received Business Card:")
+ print(string)
@dbus.service.method("org.ofono.SmartMessagingAgent",
in_signature="aya{sv}", out_signature="")
def ReceiveAppointment(self, data, props):
for key in props.keys():
- print "Key: %s, Value: %s" % (key, props[key])
+ print("Key: %s, Value: %s" % (key, props[key]))
string = ""
for byte in data:
string += str(byte)
- print "Received Appointment:"
- print string
+ print("Received Appointment:")
+ print(string)
if __name__ == '__main__':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
@@ -59,7 +59,7 @@ if __name__ == '__main__':
path = "/test/agent"
agent = SmartMessagingAgent(bus, path)
pn.RegisterAgent(path)
- print "Agent registered"
+ print("Agent registered")
mainloop = gobject.MainLoop()