This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kristjan.jonsson
Recipients kristjan.jonsson
Date 2009-01-15.23:00:59
SpamBayes Score 0.052056126
Marked as misclassified No
Message-id <1232060462.22.0.637111039397.issue4957@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-01-15 23:01:02kristjan.jonssonsetrecipients: + kristjan.jonsson
2009-01-15 23:01:02kristjan.jonssonsetmessageid: <1232060462.22.0.637111039397.issue4957@psf.upfronthosting.co.za>
2009-01-15 23:01:00kristjan.jonssonlinkissue4957 messages
2009-01-15 23:01:00kristjan.jonssoncreate