Message79925
I stumbled upon this. Of all the errors in the posixmodule.c, ftruncate
alone raises an IOError upon failure. All the others raise OSError.
This behaviour is not documented. However, the os module documentation
says>
Note
All functions in this module raise OSError in the case of invalid or
inaccessible file names and paths, or other arguments that have the
correct type, but are not accepted by the operating system.
This came to light when I added tests to verify that exceptions were
being raised by invalid file descriptors.
I propose to fix this to comply with the docs. |
|
Date |
User |
Action |
Args |
2009-01-15 23:01:02 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson |
2009-01-15 23:01:02 | kristjan.jonsson | set | messageid: <1232060462.22.0.637111039397.issue4957@psf.upfronthosting.co.za> |
2009-01-15 23:01:00 | kristjan.jonsson | link | issue4957 messages |
2009-01-15 23:01:00 | kristjan.jonsson | create | |
|