From 5cc8dc2e4df1a0ac773efb664c2bbd58fb9b3cc8 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 10 Dec 2015 11:06:17 +1100 Subject: [PATCH] Python: return number from 'call'. Return value is now more meaningful, so need to pass it back. Probably should do something better with negative values. Signed-off-by: NeilBrown --- lang-python.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lang-python.c b/lang-python.c index 6c35179d..29a56ff5 100644 --- a/lang-python.c +++ b/lang-python.c @@ -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[] = { -- 2.39.5