mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-03 07:37:16 -04:00
Removed unnecessary if condition
This commit is contained in:
+2
-2
@@ -603,12 +603,12 @@ def add_entry(): # adds a new entry
|
|||||||
if Path(f"{directory}{_entry_name}.gpg").is_file():
|
if Path(f"{directory}{_entry_name}.gpg").is_file():
|
||||||
print(f"\n\u001b[38;5;9merror: entry ({_entry_name}) already exists\u001b[0m\n")
|
print(f"\n\u001b[38;5;9merror: entry ({_entry_name}) already exists\u001b[0m\n")
|
||||||
s_exit(4)
|
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()
|
_shm_folder, _shm_entry = shm_gen()
|
||||||
run([editor, f"{tmp_dir}{_shm_folder}/{_shm_entry}-n"])
|
run([editor, f"{tmp_dir}{_shm_folder}/{_shm_entry}-n"])
|
||||||
_notes = open(f"{tmp_dir}{_shm_folder}/{_shm_entry}-n", 'r').read()
|
_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))
|
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: '))
|
_username = str(input('username: '))
|
||||||
_password = str(input('password: '))
|
_password = str(input('password: '))
|
||||||
_url = str(input('url: '))
|
_url = str(input('url: '))
|
||||||
|
|||||||
Reference in New Issue
Block a user