Merge branch 'sane' of https://github.com/manisandro/Pillow into manisandro-sane

This commit is contained in:
Alex Clark 2014-03-17 08:46:16 -04:00
commit 3695d77c4d

View File

@ -916,10 +916,13 @@ SaneDev_snap(SaneDevObject *self, PyObject *args)
call which returns SANE_STATUS_EOF in order to start
a new frame.
*/
if (st != SANE_STATUS_EOF)
{
do {
st = sane_read(self->h, buffer, READSIZE, &len);
}
while (st == SANE_STATUS_GOOD);
}
if (st != SANE_STATUS_EOF)
{
Py_BLOCK_THREADS
@ -937,10 +940,13 @@ SaneDev_snap(SaneDevObject *self, PyObject *args)
}
}
/* enforce SANE_STATUS_EOF. Can be necessary for ADF scans for some backends */
if (st != SANE_STATUS_EOF)
{
do {
st = sane_read(self->h, buffer, READSIZE, &len);
}
while (st == SANE_STATUS_GOOD);
}
if (st != SANE_STATUS_EOF)
{
sane_cancel(self->h);