From: Jelmer Vernooij Date: Mon, 26 Jan 2009 16:31:50 +0000 (+0100) Subject: pyrpc: Raise proper NDR error codes with matching strings rather than mapping X-Git-Tag: samba-4.0.0alpha7~420 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d30b6af9532c0ea4e9610b30d13e7a4d9b763834;p=thirdparty%2Fsamba.git pyrpc: Raise proper NDR error codes with matching strings rather than mapping to NTSTATUS first. --- diff --git a/source4/librpc/rpc/pyrpc.h b/source4/librpc/rpc/pyrpc.h index 6d5193f57e4..ae622b562c6 100644 --- a/source4/librpc/rpc/pyrpc.h +++ b/source4/librpc/rpc/pyrpc.h @@ -48,7 +48,7 @@ typedef struct { PyAPI_DATA(PyTypeObject) dcerpc_InterfaceType; -#define PyErr_FromNdrError(err) PyErr_FromNTSTATUS(ndr_map_error2ntstatus(err)) +#define PyErr_FromNdrError(err) Py_BuildValue("(is)", err, ndr_map_error2string(err)) #define PyErr_SetNdrError(err) \ PyErr_SetObject(PyExc_RuntimeError, PyErr_FromNdrError(err))