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/disable-call-forwarding | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/disable-call-forwarding') diff --git a/test/disable-call-forwarding b/test/disable-call-forwarding index ca0ba903..a88821dc 100755 --- a/test/disable-call-forwarding +++ b/test/disable-call-forwarding @@ -8,17 +8,17 @@ import dbus.mainloop.glib def property_changed(property, value): if len(value.__str__()) > 0: - print "CF property %s changed to %s" % (property, value) + print("CF property %s changed to %s" % (property, value)) else: - print "CF property %s changed to disabled" % (property) + print("CF property %s changed to disabled" % (property)) if canexit: mainloop.quit(); if __name__ == "__main__": if len(sys.argv) < 2: - print "Usage: %s " % (sys.argv[0]) - print "Type can be: all, conditional" + print("Usage: %s " % (sys.argv[0])) + print("Type can be: all, conditional") sys.exit(1) canexit = False @@ -42,10 +42,10 @@ if __name__ == "__main__": try: cf.DisableAll(type, timeout = 100) except dbus.DBusException, e: - print "Unable to DisableAll", e + print("Unable to DisableAll %s" % e) sys.exit(1); - print "DisableAll successful" + print("DisableAll successful") canexit = True -- cgit v1.2.3