Skip to content
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
4 changes: 4 additions & 0 deletions src/veracrypt/veracrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,11 @@ def _get_password(self, cmd: Optional[List[str]]) -> Tuple[Optional[str], int]:
try:
index = cmd.index(pword_option) + 1
pword = cmd[index]
if pword == "":
raise ValueError("Password option provided without a value.")
except ValueError:
pword = None
index = -1
except IndexError as exc:
raise ValueError("Password option provided without a value.") from exc
return pword, index
Loading