From 0e419a2163bf5cd680c75f229cb3750c2e7b9bb6 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Wed, 18 Apr 2018 14:37:12 +1200 Subject: [PATCH] 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 --- lib/ldb/pyldb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;