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/process-context-settings | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'test/process-context-settings') 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('') -- cgit v1.2.3