mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Update file.line to use writelines
instead of joining
This commit is contained in:
parent
d0b6e82ecb
commit
5d38aa8b33
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue