summaryrefslogtreecommitdiffstats
path: root/Lib/argparse.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-07-22 02:28:08 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-07-22 02:28:08 (GMT)
commitd4703d1d85fc00aeb8f46d945ce7b34606604992 (patch)
treeea40cee7dfc0ecadae6c1b8605275097d76c409c /Lib/argparse.py
parentaf418b2232e81499a81b7aa1d4879a9b594fc6a9 (diff)
parentb94082a71b6b141cdcdde52a0f01b10f9334b5a8 (diff)
downloadcpython-d4703d1d85fc00aeb8f46d945ce7b34606604992.zip
cpython-d4703d1d85fc00aeb8f46d945ce7b34606604992.tar.gz
cpython-d4703d1d85fc00aeb8f46d945ce7b34606604992.tar.bz2
Merge #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 7fa3712..74c456f 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -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