[PATCH] pyldb: make ldb.connect() url mandatory

Douglas Bagnall douglas.bagnall at catalyst.net.nz
Wed Jan 30 00:27:43 UTC 2019

Specifying the url is theoretically optional in the Python ldb.connect
binding, but leaving it unspecified means you'll end up here with a NULL
url, unless you manage to trigger another error first:

	url2 = talloc_strdup(ldb, url);
	if (!url2) {

The ldb_oom() message is not helpful in this case.

The proposed patch instead tells Python that you must provide the url,
which allows it to raise an exception saying exactly that.

This is technically a Python API change. I am unsure whether that calls
for a version nudge.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-pyldb-make-ldb.connect-url-mandatory.patch
Type: text/x-patch
Size: 978 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190130/37876a76/0001-pyldb-make-ldb.connect-url-mandatory.bin>

More information about the samba-technical mailing list