sysctl module: append newline character to lines in the file

pull/5608/merge
James Tanner 11 years ago
parent 6f49642286
commit c627358c37

@ -246,7 +246,7 @@ class SysctlModule(object):
f = open(tmp_path,"w") f = open(tmp_path,"w")
try: try:
for l in self.fixed_lines: for l in self.fixed_lines:
f.write(l) f.write(l.strip() + "\n")
except IOError, e: except IOError, e:
self.module.fail_json(msg="Failed to write to file %s: %s" % (tmp_path, str(e))) self.module.fail_json(msg="Failed to write to file %s: %s" % (tmp_path, str(e)))
f.flush() f.flush()

Loading…
Cancel
Save