diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-07-22 02:35:00 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-07-22 02:35:00 (GMT) |
commit | 056c31f9cc10a8697a40c817eae42f7e38a1cf80 (patch) | |
tree | e8d441ef0f7d29458e98689559e54f4507a7fc77 /Lib/argparse.py | |
parent | 1a2c1fbfd2208407e1af365b161276b6f103c1ad (diff) | |
download | cpython-056c31f9cc10a8697a40c817eae42f7e38a1cf80.zip cpython-056c31f9cc10a8697a40c817eae42f7e38a1cf80.tar.gz cpython-056c31f9cc10a8697a40c817eae42f7e38a1cf80.tar.bz2 |
#12353: argparse now correctly handles null argument values.
Patch by Torsten Landschoff.
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r-- | Lib/argparse.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py index d867611..f365385 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -1967,7 +1967,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 |