[issue4957] os.ftruncate raises IOError instead of OSError

2009-01-19 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: submitted as r68763 -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue4957] os.ftruncate raises IOError instead of OSError

2009-01-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: +1 for renaming. Although it looks like it has been this way since the beginning, the examples of os.ftruncate I found didn't seem to rely on this behavior. In addition, I think this is a small price to pay for good consistency. [1] [1] http://google.com/cod

[issue4957] os.ftruncate raises IOError instead of OSError

2009-01-15 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : 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