summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-10-14 13:09:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:53 -0500
commitacf657a7c228a920efe942b8776bf1bb1446f59c (patch)
tree94e5db0481e1f8d5515048374570b0ddb1224713 /source4/scripting
parentc88518cc0e68ce1cb66ecf94fc59b73deab5a278 (diff)
downloadsamba-acf657a7c228a920efe942b8776bf1bb1446f59c.tar.gz
samba-acf657a7c228a920efe942b8776bf1bb1446f59c.tar.bz2
samba-acf657a7c228a920efe942b8776bf1bb1446f59c.zip
r2975: Try to emulate NT_STATUS_IS_ERR() functionality for WERRORs. Unfortunately
this means enumerating all the ones we don't think are errors. (This used to be commit a079e044f0ef23c6c4307c9da35019ec3e8f1d2a)
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/swig/dcerpc.i6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/scripting/swig/dcerpc.i b/source4/scripting/swig/dcerpc.i
index 918445d7e3..f91f664820 100644
--- a/source4/scripting/swig/dcerpc.i
+++ b/source4/scripting/swig/dcerpc.i
@@ -286,7 +286,6 @@ PyObject *DATA_BLOB_to_python(DATA_BLOB obj)
%}
%include "samba.i"
-%include "status_codes.i"
%pythoncode %{
NTSTATUS = _dcerpc.NTSTATUS
@@ -370,7 +369,8 @@ NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **OUT,
set_ntstatus_exception(NT_STATUS_V(result));
return NULL;
}
- if (!W_ERROR_IS_OK(arg3->out.result)) {
+ if (!W_ERROR_IS_OK(arg3->out.result) &&
+ !(W_ERROR_EQUAL(arg3->out.result, WERR_INSUFFICIENT_BUFFER))) {
set_werror_exception(W_ERROR_V(arg3->out.result));
return NULL;
}
@@ -378,3 +378,5 @@ NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **OUT,
%include "librpc/gen_ndr/winreg.i"
%include "librpc/gen_ndr/spoolss.i"
+
+%include "status_codes.i"