if get_log_destination() == 'syslog':
syslog.syslog(s)
else:
- print >>sys.stderr, s
+ sys.stderr.write(s + '\n')
+ sys.stderr.flush()
#
# Exceptions.
try:
int(mtu) # Check that the value is an integer
return mtu
- except ValueError, x:
+ except ValueError as x:
log("Invalid value for mtu = %s" % mtu)
return None
network_conf = open(root_prefix() + "/etc/xensource/network.conf", 'r')
network_backend = network_conf.readline().strip()
network_conf.close()
- except Exception, e:
+ except Exception as e:
raise Error("failed to determine network backend:" + e)
if network_backend == "bridge":