Update file.line to use writelines instead of joining

This commit is contained in:
rallytime 2018-06-28 12:46:29 -04:00
parent d0b6e82ecb
commit 5d38aa8b33
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19

View file

@ -2052,7 +2052,7 @@ def line(path, content=None, match=None, mode=None, location=None,
mode = 'w'
body = salt.utils.data.decode_list(body, to_str=True)
fh_ = salt.utils.atomicfile.atomic_open(path, mode)
fh_.write(''.join(body))
fh_.writelines(body)
finally:
if fh_:
fh_.close()