git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c81863e
)
Raise a python exception when the ldb search fails
author
Andrew Bartlett
<abartlet@samba.org>
Wed, 7 Jan 2009 05:29:23 +0000
(16:29 +1100)
committer
Andrew Bartlett
<abartlet@samba.org>
Wed, 7 Jan 2009 06:09:26 +0000
(17:09 +1100)
This fixes a regression found by ldap.py in the new hand-written
python bindings.
Andrew Bartlett
source4/lib/ldb/pyldb.c
patch
|
blob
|
history
diff --git
a/source4/lib/ldb/pyldb.c
b/source4/lib/ldb/pyldb.c
index 0bc644716d12b6dff894bf60b774582851b9699d..521fa498aa568ea2e4cedb345583fd60baae24c6 100644
(file)
--- a/
source4/lib/ldb/pyldb.c
+++ b/
source4/lib/ldb/pyldb.c
@@
-848,6
+848,12
@@
static PyObject *py_ldb_search(PyLdbObject *self, PyObject *args, PyObject *kwar
talloc_free(req);
+ if (ret != LDB_SUCCESS) {
+ talloc_free(res);
+ PyErr_LDB_ERROR_IS_ERR_RAISE(ret, ldb_ctx);
+ return NULL;
+ }
+
return PyLdbResult_FromResult(res);
}