sysctl module: append newline character to lines in the file

reviewable/pr18780/r1
James Tanner 11 years ago
parent cb6f7748d5
commit 272c3634cd

@ -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()

Loading…
Cancel
Save