How to catch a usefull error message ?

Gregory Ewing greg.ewing at canterbury.ac.nz
Tue Apr 23 18:41:21 EDT 2019


Vincent Vande Vyvre wrote:
> static int
> ImgProc_init(ImgProc *self, PyObject *args, PyObject *kwds)
> {
>     PyObject *tmp;
>     char *fname;
> 
>     if (!PyArg_ParseTuple(args, "s", &fname))
>         return NULL;

You should be returning -1 here, not NULL.

-- 
Greg


More information about the Python-list mailing list