From 2e659ce36f9f48abc7515f83037274fbfb1f779e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Valur=20J=C3=B3nsson?= Date: Mon, 19 Jan 2009 13:10:27 +0000 Subject: Issue 4957 Let os.ftruncate raise OSError like documented. --- Modules/posixmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules') diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index a1c344465d..915d30d3df 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); -- cgit v1.2.1