summaryrefslogtreecommitdiffstats
path: root/test/test-call-forwarding
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-call-forwarding
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-call-forwarding')
-rwxr-xr-xtest/test-call-forwarding44
1 files changed, 22 insertions, 22 deletions
diff --git a/test/test-call-forwarding b/test/test-call-forwarding
index 85aca230..772948b5 100755
--- a/test/test-call-forwarding
+++ b/test/test-call-forwarding
@@ -6,16 +6,16 @@ import dbus
import dbus.mainloop.glib
def property_changed(property, value):
- print "CallForwarding property %s changed to %s" % (property, value)
+ print("CallForwarding property %s changed to %s" % (property, value))
def print_properties(cf):
properties = cf.GetProperties()
for p in properties:
if len(properties[p].__str__()) > 0:
- print "%s call forwarding rule is: %s" % (p, properties[p])
+ print("%s call forwarding rule is: %s" % (p, properties[p]))
else:
- print "%s call forwarding rule disabled" % (p)
+ print("%s call forwarding rule disabled" % (p))
if __name__ == "__main__":
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
@@ -37,83 +37,83 @@ if __name__ == "__main__":
try:
cf.SetProperty("FoobarNoReplyTimeout", dbus.UInt16(19))
except dbus.DBusException, e:
- print "Unable to set timeout - Good"
+ print("Unable to set timeout - Good")
try:
cf.SetProperty("VoiceNotReachableTimeout", dbus.UInt16(19))
except dbus.DBusException, e:
- print "Unable to set timeout - Good"
+ print("Unable to set timeout - Good")
try:
cf.SetProperty("VoiceNoReplyTimeout", dbus.UInt16(19))
except dbus.DBusException, e:
- print "Unable to set timeout - Good"
+ print("Unable to set timeout - Good")
try:
cf.SetProperty("DataNoReplyTimeout", dbus.UInt16(19))
except dbus.DBusException, e:
- print "Unable to set timeout - Good"
+ print("Unable to set timeout - Good")
try:
cf.SetProperty("FaxNoReplyTimeout", dbus.UInt16(19))
except dbus.DBusException, e:
- print "Unable to set timeout - Good"
+ print("Unable to set timeout - Good")
try:
cf.SetProperty("SmsNoReplyTimeout", dbus.UInt16(19))
except dbus.DBusException, e:
- print "Unable to set timeout - Good"
+ print("Unable to set timeout - Good")
try:
cf.SetProperty("VoiceNoReply", "")
except dbus.DBusException, e:
- print "Unable to erase voice no reply rule - Bad"
+ print("Unable to erase voice no reply rule - Bad")
try:
cf.SetProperty("VoiceNoReply", "+134444")
except dbus.DBusException, e:
- print "Unable to register voice no reply rule - Bad"
+ print("Unable to register voice no reply rule - Bad")
try:
cf.SetProperty("VoiceNoReplyTimeout", dbus.UInt16(30))
except dbus.DBusException, e:
- print "Unable to set voice no reply timeout - Bad"
+ print("Unable to set voice no reply timeout - Bad")
properties = cf.GetProperties()
- print properties["VoiceNoReply"]
- print properties["VoiceNoReplyTimeout"]
+ print(properties["VoiceNoReply"])
+ print(properties["VoiceNoReplyTimeout"])
try:
cf.SetProperty("VoiceUnconditional", "+155555")
except dbus.DBusException, e:
- print "Unable to set Voice Unconditional - Bad"
+ print("Unable to set Voice Unconditional - Bad")
properties = cf.GetProperties()
- print properties["VoiceUnconditional"]
+ print(properties["VoiceUnconditional"])
try:
cf.DisableAll("foobar")
except dbus.DBusException, e:
- print "Unable to delete invalids - Good"
+ print("Unable to delete invalids - Good")
try:
cf.DisableAll("conditional")
except dbus.DBusException, e:
- print "Unable to delete all conditional - Bad"
+ print("Unable to delete all conditional - Bad")
properties = cf.GetProperties()
- print properties["VoiceNoReply"]
- print properties["VoiceNoReplyTimeout"]
+ print(properties["VoiceNoReply"])
+ print(properties["VoiceNoReplyTimeout"])
try:
cf.DisableAll("all")
except dbus.DBusException, e:
- print "Unable to delete all conditional - Bad"
+ print("Unable to delete all conditional - Bad")
- print properties["VoiceUnconditional"]
+ print(properties["VoiceUnconditional"])
mainloop = gobject.MainLoop()
mainloop.run()