From: Douglas Bagnall Date: Wed, 18 Apr 2018 02:37:12 +0000 (+1200) Subject: pyldb: make ldb.connect() url mandatory X-Git-Tag: ldb-1.6.1~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e419a2163bf5cd680c75f229cb3750c2e7b9bb6;p=thirdparty%2Fsamba.git pyldb: make ldb.connect() url mandatory The call fails without it, so we might as well fail sooner Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index b2cac8a3497..8e48fa5d56d 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -1213,7 +1213,7 @@ static PyObject *py_ldb_connect(PyLdbObject *self, PyObject *args, PyObject *kwa const char * const kwnames[] = { "url", "flags", "options", NULL }; struct ldb_context *ldb_ctx; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|zIO", + if (!PyArg_ParseTupleAndKeywords(args, kwargs, "z|IO", discard_const_p(char *, kwnames), &url, &flags, &py_options)) return NULL;