Fix indentation from tabs to spaces

This commit is contained in:
3add3287 2017-09-13 20:38:39 +02:00 committed by rallytime
parent 923ec62771
commit 406f61ac9a

View file

@ -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)