summaryrefslogtreecommitdiff
path: root/source4/scripting/python/misc_wrap.c
diff options
context:
space:
mode:
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;