mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Use os.linesep instead of \n
This commit is contained in:
parent
a55d63f086
commit
65753cff6d
1 changed files with 2 additions and 1 deletions
|
@ -3565,8 +3565,9 @@ def append(name,
|
|||
else:
|
||||
ret['comment'] = 'File {0} is in correct state'.format(name)
|
||||
|
||||
with salt.utils.fopen(name, 'rb') as fp_:
|
||||
with salt.utils.fopen(name, 'r') as fp_:
|
||||
nlines = fp_.readlines()
|
||||
nlines = [item.rstrip(os.linesep) for item in nlines]
|
||||
|
||||
if slines != nlines:
|
||||
if not salt.utils.istextfile(name):
|
||||
|
|
Loading…
Add table
Reference in a new issue