[issue37696] FileIO.read() on a closed TTY throws an exception prematurely

David Wilson report at bugs.python.org
Fri Aug 9 00:38:39 EDT 2019


David Wilson <dw at botanicus.net> added the comment:

If we treat different errnos specially, the list of 'okay to silently fail' errors seems quite succinct. In another project I treat EIO, EPIPE and ECONNRESET as EOF, and raise all others -- https://github.com/dw/mitogen/blob/c6de090f083a58344e91ab97847bf7ae3feb9134/mitogen/core.py#L501-L532

But even in this case, if readall() returns the partial buffer given a 'good' errno, does it still discard the partial buffer given a 'bad' one? That still doesn't feel right

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37696>
_______________________________________


More information about the Python-bugs-list mailing list