summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ldb/pyldb.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c
index dbdfe777e0..673cee268d 100644
--- a/lib/ldb/pyldb.c
+++ b/lib/ldb/pyldb.c
@@ -995,17 +995,13 @@ static PyObject *py_ldb_modify(PyLdbObject *self, PyObject *args, PyObject *kwar
ret = ldb_request(ldb_ctx, req);
if (ret == LDB_SUCCESS) {
- ret = ldb_wait(req->handle, LDB_WAIT_ALL);
+ ret = ldb_wait(req->handle, LDB_WAIT_ALL);
}
if (ret == LDB_SUCCESS) {
ret = ldb_transaction_commit(ldb_ctx);
} else {
ldb_transaction_cancel(ldb_ctx);
- if (ldb_ctx->err_string == NULL) {
- /* no error string was setup by the backend */
- ldb_asprintf_errstring(ldb_ctx, "%s (%d)", ldb_strerror(ret), ret);
- }
}
talloc_free(mem_ctx);
@@ -1152,10 +1148,6 @@ static PyObject *py_ldb_add(PyLdbObject *self, PyObject *args, PyObject *kwargs)
ret = ldb_transaction_commit(ldb_ctx);
} else {
ldb_transaction_cancel(ldb_ctx);
- if (ldb_ctx->err_string == NULL) {
- /* no error string was setup by the backend */
- ldb_asprintf_errstring(ldb_ctx, "%s (%d)", ldb_strerror(ret), ret);
- }
}
talloc_free(mem_ctx);
@@ -1227,10 +1219,6 @@ static PyObject *py_ldb_delete(PyLdbObject *self, PyObject *args, PyObject *kwar
ret = ldb_transaction_commit(ldb_ctx);
} else {
ldb_transaction_cancel(ldb_ctx);
- if (ldb_ctx->err_string == NULL) {
- /* no error string was setup by the backend */
- ldb_asprintf_errstring(ldb_ctx, "%s (%d)", ldb_strerror(ret), ret);
- }
}
talloc_free(mem_ctx);
@@ -1310,10 +1298,6 @@ static PyObject *py_ldb_rename(PyLdbObject *self, PyObject *args, PyObject *kwar
ret = ldb_transaction_commit(ldb_ctx);
} else {
ldb_transaction_cancel(ldb_ctx);
- if (ldb_ctx->err_string == NULL) {
- /* no error string was setup by the backend */
- ldb_asprintf_errstring(ldb_ctx, "%s (%d)", ldb_strerror(ret), ret);
- }
}
talloc_free(mem_ctx);