mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-29 13:26:30 -04:00
Strip trailing whitespace before encrypting entries
Former-commit-id: 32429dfb574e465486d1397445fa8b34f5dd73fb Former-commit-id: aca5cc58197564a74e99345ed08c3363dd5acea0
This commit is contained in:
+1
-1
@@ -133,7 +133,7 @@ def edit_note(_note_lines, _exit_on_match=False):
|
||||
|
||||
# encrypts an entry and cleans up the temporary files
|
||||
def encrypt(_entry_data, _entry_dir, _gpg_id):
|
||||
_bytes_data = '\n'.join(_entry_data).encode()
|
||||
_bytes_data = '\n'.join(_entry_data).rstrip().encode()
|
||||
_encrypted_data = run(('gpg', '-qr', str(_gpg_id), '-e'), input=_bytes_data, stdout=PIPE).stdout
|
||||
open(_entry_dir + '.gpg', 'wb').write(_encrypted_data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user