summaryrefslogtreecommitdiffstats
path: root/test/set-context-property
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2014-03-11 17:39:18 +0100
committerDenis Kenzior <denkenz@gmail.com>2014-03-11 19:32:18 -0500
commit0c1fcd2b50908bda607fce70c796033e33832b11 (patch)
tree05af7c047cdb39229efd344bba4aa2198ea9105c /test/set-context-property
parentc54e4763f8f4f6239a778994cf68f077ad2b170d (diff)
downloadofono-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/set-context-property')
-rwxr-xr-xtest/set-context-property8
1 files changed, 4 insertions, 4 deletions
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 <context> <name> <value>"
+ print("Usage: set-context-property <context> <name> <value>")
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)