[New-bugs-announce] [issue24089] argparse crashes with AssertionError
SpaceOne
report at bugs.python.org
Fri May 1 06:45:58 CEST 2015
New submission from SpaceOne:
Just add an argument with metavar='[PROTOCOL://]HOST[:PORT]' ([...] twice in the string) causes the following traceback:
Traceback (most recent call last):
File "curl.py", line 182, in <module>
arguments = parser.parse_args()
File "/usr/lib/python2.7/argparse.py", line 1701, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/lib/python2.7/argparse.py", line 1733, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib/python2.7/argparse.py", line 1939, in _parse_known_args
start_index = consume_optional(start_index)
File "/usr/lib/python2.7/argparse.py", line 1879, in consume_optional
take_action(action, args, option_string)
File "/usr/lib/python2.7/argparse.py", line 1807, in take_action
action(self, namespace, argument_values, option_string)
File "/usr/lib/python2.7/argparse.py", line 996, in __call__
parser.print_help()
File "/usr/lib/python2.7/argparse.py", line 2340, in print_help
self._print_message(self.format_help(), file)
File "/usr/lib/python2.7/argparse.py", line 2314, in format_help
return formatter.format_help()
File "/usr/lib/python2.7/argparse.py", line 281, in format_help
help = self._root_section.format_help()
File "/usr/lib/python2.7/argparse.py", line 211, in format_help
func(*args)
File "/usr/lib/python2.7/argparse.py", line 332, in _format_usage
assert ' '.join(opt_parts) == opt_usage
AssertionError
----------
components: Distutils
messages: 242299
nosy: dstufft, eric.araujo, spaceone
priority: normal
severity: normal
status: open
title: argparse crashes with AssertionError
type: crash
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24089>
_______________________________________
More information about the New-bugs-announce
mailing list