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 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/test-ss') diff --git a/test/test-ss b/test/test-ss index d5488d74..7bd18af8 100755 --- a/test/test-ss +++ b/test/test-ss @@ -23,20 +23,20 @@ ss = dbus.Interface(bus.get_object('org.ofono', modem), try: ss_type, properties = ss.Initiate(ss_code, timeout=100) except dbus.DBusException, e: - print "Unable to perform operation: ", e + print("Unable to perform operation: %s" % e) sys.exit(1); if (ss_type == "CallBarring"): - print "%s : Operation [ %s ] Service Type [ %s ]" % (ss_type, properties[0], properties[1]) + print("%s : Operation [ %s ] Service Type [ %s ]" % (ss_type, properties[0], properties[1])) for key in properties[2]: - print "%s : %s" % (key, properties[2][key]) + print("%s : %s" % (key, properties[2][key])) elif (ss_type == "CallForwarding"): - print "%s : Operation [ %s ] Service Type [ %s ]" % (ss_type, properties[0], properties[1]) + print("%s : Operation [ %s ] Service Type [ %s ]" % (ss_type, properties[0], properties[1])) for key in properties[2]: - print "%s : %s" % (key, properties[2][key]) + print("%s : %s" % (key, properties[2][key])) elif (ss_type == "CallWaiting"): - print "%s : Operation [ %s ]" % (ss_type, properties[0]) + print("%s : Operation [ %s ]" % (ss_type, properties[0])) for key in properties[1]: - print "%s : %s" % (key, properties[1][key]) + print("%s : %s" % (key, properties[1][key])) else: - print "%s : Operation [ %s ] Status [ %s ]" % (ss_type, properties[0], properties[1]) + print("%s : Operation [ %s ] Status [ %s ]" % (ss_type, properties[0], properties[1])) -- cgit v1.2.3