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 <rep...@bugs.python.org>
<http://bugs.python.org/issue28557>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to