[New-bugs-announce] [issue28557] error message for bad raw readinto

David Szotten report at bugs.python.org
Sat Oct 29 13:07:25 EDT 2016


New submission from David Szotten:

Was just tracking down a bug in eventlet, which manifested as "OSError: raw readinto() returned invalid length -1 (should have been between 0 and 8192)"

I was misled for a while by the fact that readinto was in fact returning b'', not -1. This improves the error message in that case by including the TypeError from the failed conversion of b'' to an int.

Would prefer to still return an OSError with the TypeError as a cause, but couldn't figure out how to do that. Hints/help would be appreciated.

----------
components: IO
files: readinto_error.patch
keywords: patch
messages: 279685
nosy: davidszotten
priority: normal
severity: normal
status: open
title: error message for bad raw readinto
versions: Python 3.7
Added file: http://bugs.python.org/file45265/readinto_error.patch

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


More information about the New-bugs-announce mailing list