python/ext/py-source.c: raise on closing file failed
authorPaul Brossier <piem@piem.org>
Mon, 27 Feb 2017 00:15:39 +0000 (01:15 +0100)
committerPaul Brossier <piem@piem.org>
Mon, 27 Feb 2017 00:15:39 +0000 (01:15 +0100)
python/ext/py-source.c

index 71d6ba7..35a16b1 100644 (file)
@@ -242,7 +242,7 @@ Pyaubio_source_get_channels (Py_source *self, PyObject *unused)
 static PyObject *
 Pyaubio_source_close (Py_source *self, PyObject *unused)
 {
-  aubio_source_close (self->o);
+  if (aubio_source_close(self->o) != 0) return NULL;
   Py_RETURN_NONE;
 }