Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return the exit code instead of exiting in main #211

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions acquire/tools/decrypter.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
logger.setLevel(level)


def main() -> None:
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("files", nargs="+", type=Path, help="paths to encrypted files")
parser.add_argument("-o", "--output", type=Path, help="optional path to output file")
Expand Down Expand Up @@ -496,7 +496,8 @@
# Else, if all were successful but there were still tasks to handle, return 3
elif tasks:
exit_code = 3
exit(exit_code)

return exit_code

Check warning on line 500 in acquire/tools/decrypter.py

View check run for this annotation

Codecov / codecov/patch

acquire/tools/decrypter.py#L500

Added line #L500 was not covered by tests


def show_duplicates(output_directory: Path, files: list[Path]) -> None:
Expand Down
Loading