mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -04:00
Fixed fallback to standard unlock by converting some lists to tuples
Former-commit-id: d1f6a3af6f3904109e331ade7aee0f8747b34c9d Former-commit-id: f8e5df1ce733d892559dd4154e79fa45dee163c8
This commit is contained in:
+4
-4
@@ -136,13 +136,13 @@ def encrypt(_entry_dir, _shm_folder, _shm_entry, _gpg_id, _tmp_dir=f"{home}/.con
|
||||
def decrypt(_entry_dir, _shm_folder, _shm_entry, _quick_pass,
|
||||
_tmp_dir=f"{home}/.config/sshyp/tmp/"):
|
||||
if not isinstance(_quick_pass, bool):
|
||||
_unlock_method = ['gpg', '--pinentry-mode', 'loopback', '--passphrase', _quick_pass, '-qd', '--output']
|
||||
_unlock_method = ('gpg', '--pinentry-mode', 'loopback', '--passphrase', _quick_pass, '-qd', '--output')
|
||||
else:
|
||||
_unlock_method = ['gpg', '-qd', '--output']
|
||||
_unlock_method = ('gpg', '-qd', '--output')
|
||||
if _shm_folder is None and _shm_entry is None:
|
||||
_output_target = ['/dev/null', f"{home}/.config/sshyp/lock.gpg"]
|
||||
_output_target = ('/dev/null', f"{home}/.config/sshyp/lock.gpg")
|
||||
else:
|
||||
_output_target = [f"{_tmp_dir}{_shm_folder}/{_shm_entry}", f"{_entry_dir}.gpg"]
|
||||
_output_target = (f"{_tmp_dir}{_shm_folder}/{_shm_entry}", f"{_entry_dir}.gpg")
|
||||
try:
|
||||
run(_unlock_method + _output_target, stderr=DEVNULL, check=True)
|
||||
except CalledProcessError:
|
||||
|
||||
Reference in New Issue
Block a user