]> git.neil.brown.name Git - edlib.git/commitdiff
Python: return number from 'call'.
authorNeilBrown <neil@brown.name>
Thu, 10 Dec 2015 00:06:17 +0000 (11:06 +1100)
committerNeilBrown <neil@brown.name>
Thu, 10 Dec 2015 02:54:09 +0000 (13:54 +1100)
Return value is now more meaningful, so need to pass it back.

Probably should do something better with negative values.

Signed-off-by: NeilBrown <neil@brown.name>
lang-python.c

index 6c35179dcb1c8bc3e285f9a7f8896159697aa65a..29a56ff53e226f5c9f8416082649cae9ca6a374b 100644 (file)
@@ -716,9 +716,7 @@ static PyObject *edlib_call(PyObject *self, PyObject *args, PyObject *kwds)
                PyErr_SetString(Edlib_CommandFailed, ci.str ? ci.str : "Command Failed");
                return NULL;
        }
-       /* FIXME how do I return the various return values? */
-       Py_INCREF(Py_True);
-       return Py_True;
+       return PyInt_FromLong(rv);
 }
 
 static PyMethodDef edlib_methods[] = {