diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-07-31 11:07:17 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-07-31 11:07:17 (GMT) |
commit | a734af3f3926c5ed8f1547dd333901b7c8c7799d (patch) | |
tree | 76bdede99e8d65281b03c8e2456c759d219927f9 /Modules/timemodule.c | |
parent | 26f9feb3b3662150a58938d6af0259652c94f055 (diff) | |
download | cpython-a734af3f3926c5ed8f1547dd333901b7c8c7799d.zip cpython-a734af3f3926c5ed8f1547dd333901b7c8c7799d.tar.gz cpython-a734af3f3926c5ed8f1547dd333901b7c8c7799d.tar.bz2 |
timemodule.c: Replace PyExc_IOError with PyExc_OSError
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r-- | Modules/timemodule.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index d0917a4..d896091 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -169,7 +169,7 @@ time_clock_gettime(PyObject *self, PyObject *args) ret = clock_gettime((clockid_t)clk_id, &tp); if (ret != 0) { - PyErr_SetFromErrno(PyExc_IOError); + PyErr_SetFromErrno(PyExc_OSError); return NULL; } return PyFloat_FromDouble(tp.tv_sec + tp.tv_nsec * 1e-9); @@ -200,7 +200,7 @@ time_clock_settime(PyObject *self, PyObject *args) ret = clock_settime((clockid_t)clk_id, &tp); if (ret != 0) { - PyErr_SetFromErrno(PyExc_IOError); + PyErr_SetFromErrno(PyExc_OSError); return NULL; } Py_RETURN_NONE; @@ -223,7 +223,7 @@ time_clock_getres(PyObject *self, PyObject *args) ret = clock_getres((clockid_t)clk_id, &tp); if (ret != 0) { - PyErr_SetFromErrno(PyExc_IOError); + PyErr_SetFromErrno(PyExc_OSError); return NULL; } @@ -1591,7 +1591,7 @@ floatsleep(double secs) else #endif { - PyErr_SetFromErrno(PyExc_IOError); + PyErr_SetFromErrno(PyExc_OSError); return -1; } } @@ -1625,7 +1625,7 @@ floatsleep(double secs) if (rc == WAIT_OBJECT_0) { Py_BLOCK_THREADS errno = EINTR; - PyErr_SetFromErrno(PyExc_IOError); + PyErr_SetFromErrno(PyExc_OSError); return -1; } } |