mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Merge #12353: argparse now correctly handles null argument values.
Patch by Torsten Landschoff.
This commit is contained in:
commit
d4703d1d85
3 changed files with 4 additions and 1 deletions
|
@ -1979,7 +1979,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
|
|||
for arg_string in arg_strings:
|
||||
|
||||
# for regular arguments, just add them back into the list
|
||||
if arg_string[0] not in self.fromfile_prefix_chars:
|
||||
if not arg_string or arg_string[0] not in self.fromfile_prefix_chars:
|
||||
new_arg_strings.append(arg_string)
|
||||
|
||||
# replace arguments referencing files with the file content
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue