New submission from STINNER Victor: Example:
$ python3 Python 3.3.2 (default, Nov 8 2013, 13:38:57) [GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.fstat(19) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 9] Bad file descriptor >>> buf=bytearray(10) >>> os.readv(19, [buf]) -1 I would expect an OSError on os.readv() instead of -1. Moreover, empty list of buffers are not handled correctly: $ python3 Python 3.3.2 (default, Nov 8 2013, 13:38:57) [GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.readv(0, []) Traceback (most recent call last): File "<stdin>", line 1, in <module> SystemError: error return without exception set Attached patch should fix both issues. ---------- messages: 207220 nosy: haypo priority: normal severity: normal status: open title: os.readv() and os.writev() don't raise an OSError on readv()/writev() failure versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20113> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com