From 6288c45ba0c45fd2a17f787f9831e7dbda4b48c4 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 13 May 2023 21:59:19 -0400 Subject: [PATCH] Fixed lock file not being generated in gpg setup Former-commit-id: b9183ff7665bcc323ddcd9a59301b617794c0f79 Former-commit-id: fe1bab1c080ef4a1a9cf29a81c0e58c4e1b9fc4f --- lib/stweak.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/stweak.py b/lib/stweak.py index 6ad84b2..c10b715 100644 --- a/lib/stweak.py +++ b/lib/stweak.py @@ -126,12 +126,12 @@ def gpg_config(): remove(f"{home}/.config/sshyp/gpg-gen") _gpg_id = run(['gpg', '-k'], stdout=PIPE, text=True).stdout.splitlines()[-3].strip() - # lock file generation - if isfile(f"{home}/.config/sshyp/lock.gpg"): - remove(f"{home}/.config/sshyp/lock.gpg") - open(f"{home}/.config/sshyp/lock", 'w') - run(['gpg', '-qr', _gpg_id, '-e', f"{home}/.config/sshyp/lock"]) - remove(f"{home}/.config/sshyp/lock") + # lock file generation + if isfile(f"{home}/.config/sshyp/lock.gpg"): + remove(f"{home}/.config/sshyp/lock.gpg") + open(f"{home}/.config/sshyp/lock", 'w') + run(['gpg', '-qr', _gpg_id, '-e', f"{home}/.config/sshyp/lock"]) + remove(f"{home}/.config/sshyp/lock") if not sshyp_data.has_section('CLIENT-GENERAL'): sshyp_data.add_section('CLIENT-GENERAL')