"""
-import os
from cStringIO import StringIO
from ganeti import constants
out.write(line)
_write_entry(written)
- io.WriteFile(file_name, data=out.getvalue(), mode=0644)
+ io.WriteFile(file_name, data=out.getvalue(), uid=0, gid=0, mode=0644,
+ keep_perms=io.KP_IF_EXISTS)
def AddHostToEtcHosts(hostname, ip):
out.write(line)
- io.WriteFile(file_name, data=out.getvalue(), mode=0644)
+ io.WriteFile(file_name, data=out.getvalue(), uid=0, gid=0, mode=0644,
+ keep_perms=io.KP_IF_EXISTS)
def RemoveHostFromEtcHosts(hostname):