Message219949
First, 'parse_intermixed_args' on stack is not relevant. It's from an unreleased patch that we worked on.
What matters is the 'print_help', invoked probably with a '-h'.
The error message that normally specifies the problem argument is produced by ArgumentError. The HelpFormatter does not raise such an error. ArgumentError is usually used for parsing errors; this is a formatting one. It's not produced by faulty commandline values.
If you must put strings like '%)` in the help line, use RawTextHelpFormatter. Otherwise HelpFormatter assumes the help line has valid format expressions like '%(default)s'.
Or you could write your own HelpFormatter subclass with a modified '_expand_help' method, one which wraps the 'self._get_help_string(action) % params' in a 'try' block. Probably too draconian a measure for a rare problem. :)
It's an interesting problem, but I don't think it warrants any code changes. |
|
Date |
User |
Action |
Args |
2014-06-07 16:19:27 | paul.j3 | set | recipients:
+ paul.j3, v+python |
2014-06-07 16:19:27 | paul.j3 | set | messageid: <1402157967.17.0.86320602657.issue21666@psf.upfronthosting.co.za> |
2014-06-07 16:19:27 | paul.j3 | link | issue21666 messages |
2014-06-07 16:19:26 | paul.j3 | create | |
|