1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

pyldb: py_ldb_dn_add_base() uses PyErr_LDB_DN_OR_RAISE

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2024-03-14 17:24:48 +13:00 committed by Andrew Bartlett
parent 67a9e573b0
commit b83ea997e7

View File

@ -695,16 +695,18 @@ static PyObject *py_ldb_dn_add_child(PyObject *self, PyObject *args)
Py_RETURN_TRUE;
}
static PyObject *py_ldb_dn_add_base(PyLdbDnObject *self, PyObject *args)
static PyObject *py_ldb_dn_add_base(PyObject *self, PyObject *args)
{
PyObject *py_other;
struct ldb_dn *other, *dn;
struct ldb_dn *other = NULL;
struct ldb_dn *dn = NULL;
bool ok;
PyErr_LDB_DN_OR_RAISE(self, dn);
if (!PyArg_ParseTuple(args, "O", &py_other))
return NULL;
dn = pyldb_Dn_AS_DN((PyObject *)self);
if (!pyldb_Object_AsDn(NULL, py_other, ldb_dn_get_ldb_context(dn), &other))
return NULL;