added configparser back in to test with
This commit is contained in:
@@ -65,8 +65,11 @@ def read_config_file(config_file):
|
||||
for section in sections:
|
||||
email = decrypt(client, section)
|
||||
logger.debug("Sections: {}".format(email))
|
||||
logger.debug("Found the following key under sectcion...")
|
||||
accounts[email] = dict()
|
||||
for key in config[section]:
|
||||
logger.debug("Found the following key under sectcion...(Values will not be displayed)")
|
||||
logger.debug("Key: {}".format(key))
|
||||
accounts[email][key] = decrypt(client, config[section][key])
|
||||
logger.debug("Finished reading config file and decrypting contents")
|
||||
return accounts
|
||||
@@ -362,6 +365,7 @@ if __name__ == "__main__":
|
||||
|
||||
elif user_input.casefold() == "n":
|
||||
account_details = ask_for_account_details()
|
||||
config = configparser.ConfigParser()
|
||||
config.add_section(account_details["encrypted_account_email_address"])
|
||||
for key in account_details.keys():
|
||||
if not key == "encrypted_account_email_address":
|
||||
@@ -371,6 +375,7 @@ if __name__ == "__main__":
|
||||
break
|
||||
|
||||
elif user_input.casefold() == "d":
|
||||
config = configparser.ConfigParser()
|
||||
account_section_to_delete = select_account(accounts, "delete")
|
||||
print("Are you sure you wish to delete {} account? ".format(account_section_to_delete))
|
||||
confirmation = input("y/n> ")
|
||||
|
||||
Reference in New Issue
Block a user