summaryrefslogtreecommitdiffstats
path: root/Lib/argparse.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-07-22 02:35:00 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-07-22 02:35:00 (GMT)
commit056c31f9cc10a8697a40c817eae42f7e38a1cf80 (patch)
treee8d441ef0f7d29458e98689559e54f4507a7fc77 /Lib/argparse.py
parent1a2c1fbfd2208407e1af365b161276b6f103c1ad (diff)
downloadcpython-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.py2
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