Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix empty --password handling in CLI option parsing#35

Merged
srichs merged 1 commit intomainsrichs/python-veracrypt:mainfrom
codex/review-code-for-improvementssrichs/python-veracrypt:codex/review-code-for-improvementsCopy head branch name to clipboard
Feb 13, 2026
Merged

Fix empty --password handling in CLI option parsing#35
srichs merged 1 commit intomainsrichs/python-veracrypt:mainfrom
codex/review-code-for-improvementssrichs/python-veracrypt:codex/review-code-for-improvementsCopy head branch name to clipboard

Conversation

@srichs
Copy link
Owner

@srichs srichs commented Feb 13, 2026

Motivation

  • _get_password previously caught all ValueErrors and treated an explicitly empty --password//password value as if the option were absent, which masks invalid input.

Description

  • Update _get_password to first check for the presence of the password flag and return (None, -1) only when the flag is missing, and to still raise ValueError when the flag is present but has no value, and add test_get_password_empty_value_raises to cover this behavior.

Testing

  • Ran pytest -q and the test suite passed: 43 passed.

Codex Task

@srichs srichs merged commit 250e4fa into main Feb 13, 2026
8 of 9 checks passed
@srichs srichs deleted the codex/review-code-for-improvements branch February 13, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.