mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix indentation from tabs to spaces
This commit is contained in:
parent
923ec62771
commit
406f61ac9a
1 changed files with 8 additions and 8 deletions
|
@ -739,14 +739,14 @@ def set_auth_key(
|
|||
try:
|
||||
with salt.utils.fopen(fconfig, 'ab+') as _fh:
|
||||
if new_file is False:
|
||||
# Let's make sure we have a new line at the end of the file
|
||||
_fh.seek(0,2)
|
||||
if _fh.tell() > 0:
|
||||
# File isn't empty, check if last byte is a newline
|
||||
# If not, add one
|
||||
_fh.seek(-1,2)
|
||||
if _fh.read(1) != six.b('\n'):
|
||||
_fh.write(six.b('\n'))
|
||||
# Let's make sure we have a new line at the end of the file
|
||||
_fh.seek(0,2)
|
||||
if _fh.tell() > 0:
|
||||
# File isn't empty, check if last byte is a newline
|
||||
# If not, add one
|
||||
_fh.seek(-1,2)
|
||||
if _fh.read(1) != six.b('\n'):
|
||||
_fh.write(six.b('\n'))
|
||||
if six.PY3:
|
||||
auth_line = auth_line.encode(__salt_system_encoding__)
|
||||
_fh.write(auth_line)
|
||||
|
|
Loading…
Add table
Reference in a new issue