mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +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:
parent
89440dd617
commit
d073c5f23a
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user