summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/misc.i7
-rw-r--r--source4/scripting/python/misc_wrap.c6
2 files changed, 7 insertions, 6 deletions
diff --git a/source4/scripting/python/misc.i b/source4/scripting/python/misc.i
index 56b862552a..1d331215b5 100644
--- a/source4/scripting/python/misc.i
+++ b/source4/scripting/python/misc.i
@@ -35,7 +35,7 @@
%import "../../auth/credentials/credentials.i"
%import "../../param/param.i"
%import "../../libcli/security/security.i"
-%import "../../libcli/util/errors.i"
+%include "../../libcli/util/errors.i"
%feature("docstring") generate_random_str "S.random_password(len) -> string\n" \
"Generate random password with specified length.";
@@ -97,7 +97,6 @@ bool dsdb_set_ntds_invocation_id(struct ldb_context *ldb, const char *guid)
}
%}
-char *private_path(TALLOC_CTX* mem_ctx,
- struct loadparm_context *lp_ctx,
- const char *name);
+char *private_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx,
+ const char *name);
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;