~ubuntu-branches/ubuntu/precise/python3.2/precise-proposed

« back to all changes in this revision

Viewing changes to Modules/ossaudiodev.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-03-09 18:40:39 UTC
  • mfrom: (30.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120309184039-j3yk2emxr1plyo21
Tags: 3.2.3~rc1-1
* Python 3.2.3 release candidate 1.
* Update to 20120309 from the 3.2 branch.
* Fix libpython.a symlink. Closes: #660146.
* Build-depend on xauth.
* Run the gdb tests for the debug build only.

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
    }
130
130
 
131
131
    if (ioctl(fd, SNDCTL_DSP_GETFMTS, &afmts) == -1) {
 
132
        close(fd);
132
133
        PyErr_SetFromErrnoWithFilename(PyExc_IOError, devicename);
133
134
        return NULL;
134
135
    }
425
426
    if (!PyArg_ParseTuple(args, "y#:write", &cp, &size))
426
427
        return NULL;
427
428
 
 
429
    if (!_PyIsSelectable_fd(self->fd)) {
 
430
        PyErr_SetString(PyExc_ValueError,
 
431
                        "file descriptor out of range for select");
 
432
        return NULL;
 
433
    }
428
434
    /* use select to wait for audio device to be available */
429
435
    FD_ZERO(&write_set_fds);
430
436
    FD_SET(self->fd, &write_set_fds);