summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/dsdb/pydsdb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index 41985ba648..dbd3895022 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -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;
}