diff options
author | Peter Eisentraut | 2016-10-27 16:00:00 +0000 |
---|---|---|
committer | Peter Eisentraut | 2016-10-27 19:41:29 +0000 |
commit | eaed88ce120746b3004225252f52d8c79fea2f58 (patch) | |
tree | 2641cd6cc2ab19ff68e6f538a3ca764ea09b43de /src/pl/plpython/plpy_planobject.c | |
parent | 84d457edaf4b3a1e10fd9e100e8ca18c042ad30c (diff) |
Add function name to PyArg_ParseTuple()
This causes the supplied function name to appear in any error message,
making the error message friendlier and relieving us from having to
provide our own in some cases.
Diffstat (limited to 'src/pl/plpython/plpy_planobject.c')
-rw-r--r-- | src/pl/plpython/plpy_planobject.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pl/plpython/plpy_planobject.c b/src/pl/plpython/plpy_planobject.c index a9040efb502..16c39a05ddf 100644 --- a/src/pl/plpython/plpy_planobject.c +++ b/src/pl/plpython/plpy_planobject.c @@ -114,12 +114,11 @@ PLy_plan_dealloc(PyObject *arg) static PyObject * PLy_plan_status(PyObject *self, PyObject *args) { - if (PyArg_ParseTuple(args, "")) + if (PyArg_ParseTuple(args, ":status")) { Py_INCREF(Py_True); return Py_True; /* return PyInt_FromLong(self->status); */ } - PLy_exception_set(PLy_exc_error, "plan.status takes no arguments"); return NULL; } |