1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s4-pydsdb: py_dsdb_load_partition_usn() - simplify error handling in

and print on which partition error has occured
This commit is contained in:
Kamen Mazdrashki 2010-11-08 23:50:23 +02:00
parent 89440dd617
commit d073c5f23a

View File

@ -483,8 +483,10 @@ static PyObject *py_dsdb_load_partition_usn(PyObject *self, PyObject *args)
ret = dsdb_load_partition_usn(ldb, dn, &highest_uSN, &urgent_uSN);
if (ret != LDB_SUCCESS) {
char *errstr = talloc_asprintf(mem_ctx, "Failed to load partition uSN - %s", ldb_errstring(ldb));
PyErr_SetString(PyExc_RuntimeError, errstr);
PyErr_Format(PyExc_RuntimeError,
"Failed to load partition [%s] uSN - %s",
ldb_dn_get_linearized(dn),
ldb_errstring(ldb));
talloc_free(mem_ctx);
return NULL;
}