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/set-context-property | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/set-context-property') diff --git a/test/set-context-property b/test/set-context-property index cfd6c688..c18e55a0 100755 --- a/test/set-context-property +++ b/test/set-context-property @@ -4,7 +4,7 @@ import sys import dbus if len(sys.argv) < 4: - print "Usage: set-context-property " + print("Usage: set-context-property ") sys.exit(1) bus = dbus.SystemBus() @@ -24,7 +24,7 @@ for path, properties in modems: contexts = connman.GetContexts() if (len(contexts) == 0): - print "No context available" + print("No context available") sys.exit(1) path = contexts[int(sys.argv[1])][0] @@ -34,6 +34,6 @@ for path, properties in modems: try: context.SetProperty(sys.argv[2], sys.argv[3]) except dbus.DBusException, e: - print "Error setting context %s property %s: %s" %\ - (path, sys.argv[2], str(e)) + print("Error setting context %s property %s: %s" %\ + (path, sys.argv[2], str(e))) exit(2) -- cgit v1.2.3