[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

Aviv Palivoda report at bugs.python.org
Sat Mar 5 12:56:49 EST 2016


Aviv Palivoda added the comment:

I fixed the tests to work with Steven patch. Also changed the patch to open sys.std{in,out} with closefd=False.

I changed the 'io.StringIO' that we redirect the stdout, stderr to. Now the 'StdIOBuffer' return the real stdout,stderr when '-' is passed to FileType. This was already done in the 'stderr_to_parser_error' function previously after the call to 'parse_args'.

----------
nosy: +palaviv
Added file: http://bugs.python.org/file42072/14156-2.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14156>
_______________________________________


More information about the Python-bugs-list mailing list