diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-11-08 23:50:23 +0200 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-11-10 10:20:01 +0200 |
commit | d073c5f23ae6563a65af73fd6dc88886099011da (patch) | |
tree | 356f6ffa510eef1470ecb3d67877cf5728bc7639 | |
parent | 89440dd617eb4ff64cda8bf97f1f22ddf94bf717 (diff) | |
download | samba-d073c5f23ae6563a65af73fd6dc88886099011da.tar.gz samba-d073c5f23ae6563a65af73fd6dc88886099011da.tar.bz2 samba-d073c5f23ae6563a65af73fd6dc88886099011da.zip |
s4-pydsdb: py_dsdb_load_partition_usn() - simplify error handling in
and print on which partition error has occured
-rw-r--r-- | source4/dsdb/pydsdb.c | 6 |
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; } |