From e594a625d923aa3a228f3e5f11e20e15221fc12e Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 25 May 2023 08:42:36 -0400 Subject: [PATCH] Fixed fallback to standard unlock by converting some lists to tuples Former-commit-id: d1f6a3af6f3904109e331ade7aee0f8747b34c9d Former-commit-id: f8e5df1ce733d892559dd4154e79fa45dee163c8 --- lib/sshyp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sshyp.py b/lib/sshyp.py index 465b79b..807283a 100755 --- a/lib/sshyp.py +++ b/lib/sshyp.py @@ -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: