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-ss-control-cf | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'test/test-ss-control-cf') diff --git a/test/test-ss-control-cf b/test/test-ss-control-cf index 6391bddd..1ba95127 100755 --- a/test/test-ss-control-cf +++ b/test/test-ss-control-cf @@ -6,7 +6,7 @@ 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() @@ -17,7 +17,7 @@ def print_properties(cf): else: value = "disabled" - print "%s call forwarding rule: %s" % (p, value) + print("%s call forwarding rule: %s" % (p, value)) if __name__ == "__main__": dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) @@ -42,33 +42,33 @@ if __name__ == "__main__": print_properties(cf) # Busy To +155542, for Voice - print "Setting Busy Voice rule to +155542" - print ss.Initiate("*67*+155542*11#") + print("Setting Busy Voice rule to +155542") + print(ss.Initiate("*67*+155542*11#")) print_properties(cf) # Not Reachable to +155543, Voice - print "Setting Voice Not Reachable rule to +155543" - print ss.Initiate("**62*+155543*11#") + print("Setting Voice Not Reachable rule to +155543") + print(ss.Initiate("**62*+155543*11#")) # Not Reachable to +155544, Voice service - print "Setting Voice No Reply rule to +155544, timeout=30" - print ss.Initiate("**61*+155544*11*30#") + print("Setting Voice No Reply rule to +155544, timeout=30") + print(ss.Initiate("**61*+155544*11*30#")) # Unconditional to +155547, Voice - print "Setting Unconditional for Voice to +155545" - print ss.Initiate("*21*+155545*10#") + print("Setting Unconditional for Voice to +155545") + print(ss.Initiate("*21*+155545*10#")) print_properties(cf) - print "Query all voice forwardings" - print ss.Initiate("*#002**11#") + print("Query all voice forwardings") + print(ss.Initiate("*#002**11#")) - print "Query no reply voice forwardings" - print ss.Initiate("*#61**11#") + print("Query no reply voice forwardings") + print(ss.Initiate("*#61**11#")) # Deactivate everything - print "Deactivating everything" - print ss.Initiate("##002#") + print("Deactivating everything") + print(ss.Initiate("##002#")) print_properties(cf) mainloop = gobject.MainLoop() -- cgit v1.2.3