From c729414b035feb50dff7c87c39b52643cc3a1f28 Mon Sep 17 00:00:00 2001 From: Ethan Paul <24588726+enpaul@users.noreply.github.com> Date: Sat, 7 May 2022 12:26:56 -0400 Subject: [PATCH] Document main logic function for processing filepaths Fix docstring on confirm function --- vault2vault.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vault2vault.py b/vault2vault.py index 9441586..c210816 100644 --- a/vault2vault.py +++ b/vault2vault.py @@ -73,6 +73,19 @@ def _process_file( # pylint: disable=too-many-statements backup: bool, ignore: bool, ) -> None: + """Determine whether a filepath includes vaulted data and if so, rekey it + + :param path: Path to the file to check + :param old: VaultLib object with the current (old) vault password encoded in it + :param new: VaultLib object with the target (new) vault password encoded in it + :param interactive: Whether to prompt interactively for confirmation before each + rekey operation + :param backup: Whether to copy the original file to a backup before making any + in-place changes + :param ignore: Whether to ignore any errors that come from failing to decrypt + any vaulted data + """ + logger = logging.getLogger(__name__) logger.debug(f"Processing file {path}") @@ -348,6 +361,7 @@ def _load_password( the password will be prompted for interactively. :param desc: Description text to inject into the interactive password prompt. Useful when using this function multiple times to identify different passwords to the user. + :param confirm: Whether to prompt twice for the input and check that the two inputs match :returns: Populated vault secret object with the loaded password """