From dab4eaa58517f91624a2fce8daef0a41d05586ee Mon Sep 17 00:00:00 2001 From: crp3844 Date: Wed, 7 Sep 2022 10:57:41 -0400 Subject: [PATCH] added configparser back in to test with --- bitwardenBackup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bitwardenBackup.py b/bitwardenBackup.py index 1debfe3..2e71825 100644 --- a/bitwardenBackup.py +++ b/bitwardenBackup.py @@ -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> ")