Commit c627358c by James Tanner

sysctl module: append newline character to lines in the file

parent 6f496422
......@@ -246,7 +246,7 @@ class SysctlModule(object):
f = open(tmp_path,"w")
try:
for l in self.fixed_lines:
f.write(l)
f.write(l.strip() + "\n")
except IOError, e:
self.module.fail_json(msg="Failed to write to file %s: %s" % (tmp_path, str(e)))
f.flush()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment