diff options
Diffstat (limited to 'Modules/ossaudiodev.c')
| -rw-r--r-- | Modules/ossaudiodev.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Modules/ossaudiodev.c b/Modules/ossaudiodev.c index 2d0dd098d8..34e68c7ad4 100644 --- a/Modules/ossaudiodev.c +++ b/Modules/ossaudiodev.c @@ -116,11 +116,8 @@ newossobject(PyObject *arg) provides a special ioctl() for non-blocking read/write, which is exposed via oss_nonblock() below. */ fd = _Py_open(devicename, imode|O_NONBLOCK); - - if (fd == -1) { - PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename); + if (fd == -1) return NULL; - } /* And (try to) put it back in blocking mode so we get the expected write() semantics. */ @@ -180,10 +177,8 @@ newossmixerobject(PyObject *arg) } fd = _Py_open(devicename, O_RDWR); - if (fd == -1) { - PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename); + if (fd == -1) return NULL; - } if ((self = PyObject_New(oss_mixer_t, &OSSMixerType)) == NULL) { close(fd); |
