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/process-context-settings | |
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/process-context-settings')
-rwxr-xr-x | test/process-context-settings | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/process-context-settings b/test/process-context-settings index 09635b32..0f058b2a 100755 --- a/test/process-context-settings +++ b/test/process-context-settings @@ -23,7 +23,7 @@ for path, properties in modems: if properties["Active"] == dbus.Boolean(0): continue - print "Configuring %s" % (path) + print("Configuring %s" % (path)) settings = properties["Settings"] @@ -35,20 +35,20 @@ for path, properties in modems: gateway = "0.0.0.0"; if settings["Method"] == "dhcp": - print " Run DHCP on interface %s" % (interface) + print(" Run DHCP on interface %s" % (interface)) else: - print " Interface is %s" % (interface) - print " IP address is %s" % (address) - print " Gateway is %s" % (gateway) + print(" Interface is %s" % (interface)) + print(" IP address is %s" % (address)) + print(" Gateway is %s" % (gateway)) cmd = "ifconfig " + interface + " " + address cmd += " netmask 255.255.255.255" os.system(cmd); for i in settings["DomainNameServers"]: - print " Nameserver is %s" % (i) + print(" Nameserver is %s" % (i)) cmd = "route add -host " + i cmd +=" dev " + interface os.system(cmd); - print + print('') |