summaryrefslogtreecommitdiffstats
path: root/Lib/argparse.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-07-22 02:20:11 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-07-22 02:20:11 (GMT)
commitb94082a71b6b141cdcdde52a0f01b10f9334b5a8 (patch)
tree785ad44680a21cd11f81883bba5b2b585daf3710 /Lib/argparse.py
parent15cd9a0be4cfa7875267a06046a8c20ab8bb3482 (diff)
downloadcpython-b94082a71b6b141cdcdde52a0f01b10f9334b5a8.zip
cpython-b94082a71b6b141cdcdde52a0f01b10f9334b5a8.tar.gz
cpython-b94082a71b6b141cdcdde52a0f01b10f9334b5a8.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 cf0097b..25803b3 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -1976,7 +1976,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