Message207220
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. |
|
Date |
User |
Action |
Args |
2014-01-03 11:19:28 | vstinner | set | recipients:
+ vstinner |
2014-01-03 11:19:28 | vstinner | set | messageid: <1388747968.16.0.893473617326.issue20113@psf.upfronthosting.co.za> |
2014-01-03 11:19:28 | vstinner | link | issue20113 messages |
2014-01-03 11:19:27 | vstinner | create | |
|