diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2014-03-11 17:39:18 +0100 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2014-03-11 19:32:18 -0500 |
commit | 0c1fcd2b50908bda607fce70c796033e33832b11 (patch) | |
tree | 05af7c047cdb39229efd344bba4aa2198ea9105c /test/disable-call-forwarding | |
parent | c54e4763f8f4f6239a778994cf68f077ad2b170d (diff) | |
download | ofono-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/disable-call-forwarding')
-rwxr-xr-x | test/disable-call-forwarding | 12 |
1 files changed, 6 insertions, 6 deletions
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 <type>" % (sys.argv[0]) - print "Type can be: all, conditional" + print("Usage: %s <type>" % (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 |