[issue25436] argparse.ArgumentError missing error message in __repr__
Daniel Fortunov
report at bugs.python.org
Sun Oct 18 15:29:45 EDT 2015
New submission from Daniel Fortunov:
ArgumentError's __init__() fails to call super(), meaning
that the base exception doesn’t get a message, and thus repr() always
returns “argparse.ArgumentError()” with no message.
Not very helpful if that repr gets logged, or included in another error message :-(
I've attached a patch that fixes this, and adds corresponding tests.
----------
components: Library (Lib)
files: cpython_ArgumentError_repr.patch
keywords: patch
messages: 253160
nosy: dfortunov
priority: normal
severity: normal
status: open
title: argparse.ArgumentError missing error message in __repr__
Added file: http://bugs.python.org/file40813/cpython_ArgumentError_repr.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25436>
_______________________________________
More information about the Python-bugs-list
mailing list