Fix for 1309746 , fixes suggestion from james troup

This commit is contained in:
Jorge Niedbalski R 2014-04-18 18:45:53 -04:00
parent 0b163b0a4c
commit 685c0f9f19
1 changed files with 1 additions and 1 deletions

View File

@ -627,7 +627,7 @@ def ssh_compute_remove(public_key, user=None):
with open(authorized_keys(user), 'w') as _keys:
keys = '\n'.join(keys)
if not keys[-1] == '\n':
if not keys.endswith('\n'):
keys += '\n'
_keys.write(keys)