summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorKristján Valur Jónsson <kristjan@ccpgames.com>2009-01-19 13:10:27 (GMT)
committerKristján Valur Jónsson <kristjan@ccpgames.com>2009-01-19 13:10:27 (GMT)
commit2e659ce36f9f48abc7515f83037274fbfb1f779e (patch)
tree75ea018db7a9dd7566a72c000a686a6cfe09a142 /Modules
parent4b78233cbd845cdd4b49bc5999a2ea9ea028b277 (diff)
downloadcpython-2e659ce36f9f48abc7515f83037274fbfb1f779e.zip
cpython-2e659ce36f9f48abc7515f83037274fbfb1f779e.tar.gz
cpython-2e659ce36f9f48abc7515f83037274fbfb1f779e.tar.bz2
Issue 4957
Let os.ftruncate raise OSError like documented.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index a1c3444..915d30d 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -6633,7 +6633,7 @@ posix_ftruncate(PyObject *self, PyObject *args)
res = ftruncate(fd, length);
Py_END_ALLOW_THREADS
if (res < 0) {
- PyErr_SetFromErrno(PyExc_IOError);
+ posix_error();
return NULL;
}
Py_INCREF(Py_None);