Skip to content

Commit e6308a6

Browse files
committed
Make suggested changes by gcmoreira
1 parent d576f8c commit e6308a6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

volatility3/cli/volargparse.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ def _match_argument(self, action, arg_strings_pattern) -> int:
100100
return len(match.group(1))
101101

102102
def _check_value(self, action: argparse.Action, value: Any) -> None:
103+
"""This is called to ensure a value is correct/valid
104+
This fails when we want to accept partial values for the plugin name,
105+
so we disable the check (which will throw ArgumentErrors for failed checks)
106+
but only for our plugin subparser, so all other arguments are checked correctly
107+
"""
103108
if not isinstance(action, HelpfulSubparserAction):
104-
return super()._check_value(action, value)
109+
super()._check_value(action, value)
105110
return None

0 commit comments

Comments
 (0)