[issue9509] argparse FileType raises ugly exception for missing file
Steven Bethard
report at bugs.python.org
Wed Nov 24 21:13:46 CET 2010
Steven Bethard <steven.bethard at gmail.com> added the comment:
I'm not sure about the patch - this will convert *all* IOErrors into command line error messages, while we should really only be converting the ones raised by FileType. Instead, the try/except should be in FileType.__call__, and you should raise an ArgumentTypeError there.
The test looks fine.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9509>
_______________________________________
More information about the Python-bugs-list
mailing list