updated config while loop to work when secrets files is removed
This commit is contained in:
@@ -396,21 +396,22 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
|
|
||||||
if opts.config:
|
if opts.config:
|
||||||
if not does_file_exist(secrets_config_file):
|
|
||||||
print("No Bitwarden accounts found, do you want to make a new one?")
|
|
||||||
print("n) New account")
|
|
||||||
print("q) Quit config")
|
|
||||||
while True:
|
|
||||||
user_input = input("n/q> ")
|
|
||||||
if user_input.casefold() == "n":
|
|
||||||
account_details = ask_for_account_details()
|
|
||||||
write_config_file(account_details, secrets_config_file)
|
|
||||||
break
|
|
||||||
elif user_input.casefold() == "q":
|
|
||||||
sys.exit(0)
|
|
||||||
else:
|
|
||||||
print("This value must be one of the following characters: n, q.")
|
|
||||||
while True:
|
while True:
|
||||||
|
if not does_file_exist(secrets_config_file):
|
||||||
|
print("No Bitwarden accounts found, do you want to make a new one?")
|
||||||
|
print(" ")
|
||||||
|
print("n) New account")
|
||||||
|
print("q) Quit config")
|
||||||
|
while True:
|
||||||
|
user_input = input("n/q> ")
|
||||||
|
if user_input.casefold() == "n":
|
||||||
|
account_details = ask_for_account_details()
|
||||||
|
write_config_file(account_details, secrets_config_file)
|
||||||
|
break
|
||||||
|
elif user_input.casefold() == "q":
|
||||||
|
sys.exit(0)
|
||||||
|
else:
|
||||||
|
print("This value must be one of the following characters: n, q.")
|
||||||
accounts = read_config_file(secrets_config_file)
|
accounts = read_config_file(secrets_config_file)
|
||||||
print(accounts)
|
print(accounts)
|
||||||
print("Current Bitwarden accounts:")
|
print("Current Bitwarden accounts:")
|
||||||
|
|||||||
Reference in New Issue
Block a user