From 6857fe3c09e1b42e7bef7c16f052e9e1f7742364 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Mon, 20 Feb 2023 00:14:01 -0500 Subject: [PATCH] Removed unnecessary if condition --- lib/sshyp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sshyp.py b/lib/sshyp.py index a98d89a..679b12c 100755 --- a/lib/sshyp.py +++ b/lib/sshyp.py @@ -603,12 +603,12 @@ def add_entry(): # adds a new entry if Path(f"{directory}{_entry_name}.gpg").is_file(): print(f"\n\u001b[38;5;9merror: entry ({_entry_name}) already exists\u001b[0m\n") s_exit(4) - if arguments[arg_start_p] == 'note' or arguments[arg_start_p] == '-n': + if arguments[arg_start_p] == 'note' or arguments[arg_start_p] == '-n': # note entry _shm_folder, _shm_entry = shm_gen() run([editor, f"{tmp_dir}{_shm_folder}/{_shm_entry}-n"]) _notes = open(f"{tmp_dir}{_shm_folder}/{_shm_entry}-n", 'r').read() open(f"{tmp_dir}{_shm_folder}/{_shm_entry}", 'w').writelines(optimized_edit(['', '', '', _notes], None, -1)) - elif arguments[arg_start_p] == 'password' or arguments[arg_start_p] == '-p': # TODO does this need to have the if? + else: # password entry _username = str(input('username: ')) _password = str(input('password: ')) _url = str(input('url: '))