summaryrefslogtreecommitdiff
path: root/source4/scripting/python/misc_wrap.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-24 21:38:33 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-24 21:38:33 +0200
commitf9c36fae757d197ee4de06f0ecf94ae13faad0de (patch)
tree9c93537b32bc7b0748183b894c2a1e600a0eff76 /source4/scripting/python/misc_wrap.c
parentfe5be25547b5517ebc2e74d298921ae8c53650e5 (diff)
downloadsamba-f9c36fae757d197ee4de06f0ecf94ae13faad0de.tar.gz
samba-f9c36fae757d197ee4de06f0ecf94ae13faad0de.tar.bz2
samba-f9c36fae757d197ee4de06f0ecf94ae13faad0de.zip
Export functions for setting NTSTATUS and WERRORs in python.
(This used to be commit 4bcb92d2d49d90863b1e64b15d055517fbfd263c)
Diffstat (limited to 'source4/scripting/python/misc_wrap.c')
-rw-r--r--source4/scripting/python/misc_wrap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/scripting/python/misc_wrap.c b/source4/scripting/python/misc_wrap.c
index 8c57237e5b..888918ef53 100644
--- a/source4/scripting/python/misc_wrap.c
+++ b/source4/scripting/python/misc_wrap.c
@@ -2554,6 +2554,9 @@ static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0};
#include "librpc/ndr/libndr.h"
+#include "libcli/util/pyerrors.h"
+
+
SWIGINTERN int
SWIG_AsVal_double (PyObject *obj, double *val)
{
@@ -3046,8 +3049,7 @@ SWIGINTERN PyObject *_wrap_dsdb_attach_schema_from_ldif_file(PyObject *SWIGUNUSE
"ldb context must be non-NULL");
result = dsdb_attach_schema_from_ldif_file(arg1,(char const *)arg2,(char const *)arg3);
if (!W_ERROR_IS_OK(result)) {
- PyObject *obj = Py_BuildValue((char *)"(i,s)", W_ERROR_V(result), win_errstr(result));
- PyErr_SetObject(PyExc_RuntimeError, obj);
+ PyErr_SetWERROR(result);
SWIG_fail;
} else if (resultobj == NULL) {
resultobj = Py_None;