mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use write instead of writelines for Windows
This commit is contained in:
parent
adc8950bbe
commit
9ea02d7045
1 changed files with 2 additions and 1 deletions
|
@ -173,7 +173,8 @@ def _replace_auth_key(
|
|||
# Re-open the file writable after properly closing it
|
||||
with salt.utils.files.fopen(full, 'w') as _fh:
|
||||
# Write out any changes
|
||||
_fh.writelines(lines)
|
||||
for line in lines:
|
||||
_fh.write(line)
|
||||
except (IOError, OSError) as exc:
|
||||
raise CommandExecutionError(
|
||||
'Problem reading or writing to key file: {0}'.format(exc)
|
||||
|
|
Loading…
Add table
Reference in a new issue