1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-16 20:59:12 +03:00

s4-python: Remove convenience macro PyErr_SetStringError.

This macro assumed that all errors were runtime errors.
This commit is contained in:
Jelmer Vernooij
2010-04-04 00:22:29 +02:00
parent 8afd52a641
commit aed295b97e
3 changed files with 3 additions and 6 deletions

View File

@ -513,7 +513,7 @@ static PyObject *py_samdb_ntds_invocation_id(PyObject *self, PyObject *args)
guid = samdb_ntds_invocation_id(ldb);
if (guid == NULL) {
PyErr_SetStringError("Failed to find NTDS invocation ID");
PyErr_SetString(PyExc_RuntimeError, "Failed to find NTDS invocation ID");
talloc_free(mem_ctx);
return NULL;
}
@ -546,7 +546,7 @@ static PyObject *py_samdb_ntds_objectGUID(PyObject *self, PyObject *args)
guid = samdb_ntds_objectGUID(ldb);
if (guid == NULL) {
PyErr_SetStringError("Failed to find NTDS GUID");
PyErr_SetString(PyExc_RuntimeError, "Failed to find NTDS GUID");
talloc_free(mem_ctx);
return NULL;
}