The branch, master has been updated
       via  4383665 python-s4: use PyErr_SetNTSTATUS instead of 
PyErr_NTSTATUS_IS_ERR_RAISE as it use NT_STATUS_IS_ERROR which is not 
completely the same as NT_STATUS_IS_OK
      from  766d43e pys4: really return an exception if the status if not 
correct

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 4383665101db5c2ddb37d5c90ee9304e468b0310
Author: Matthieu Patou <[email protected]>
Date:   Thu Sep 22 22:36:36 2011 -0700

    python-s4: use PyErr_SetNTSTATUS instead of PyErr_NTSTATUS_IS_ERR_RAISE as 
it use NT_STATUS_IS_ERROR which is not completely the same as NT_STATUS_IS_OK
    
    Autobuild-User: Matthieu Patou <[email protected]>
    Autobuild-Date: Fri Sep 23 09:22:56 CEST 2011 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source4/ntvfs/posix/python/pyxattr_tdb.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/posix/python/pyxattr_tdb.c 
b/source4/ntvfs/posix/python/pyxattr_tdb.c
index a08557e..768dcbc 100644
--- a/source4/ntvfs/posix/python/pyxattr_tdb.c
+++ b/source4/ntvfs/posix/python/pyxattr_tdb.c
@@ -60,8 +60,9 @@ static PyObject *py_wrap_setxattr(PyObject *self, PyObject 
*args)
        status = push_xattr_blob_tdb_raw(eadb, mem_ctx, attribute, filename, -1,
                                                                         &blob);
        if (!NT_STATUS_IS_OK(status)) {
+               PyErr_SetNTSTATUS(status);
                talloc_free(mem_ctx);
-               PyErr_NTSTATUS_IS_ERR_RAISE(status);
+               return NULL;
        }
        talloc_free(mem_ctx);
        Py_RETURN_NONE;
@@ -90,8 +91,9 @@ static PyObject *py_wrap_getxattr(PyObject *self, PyObject 
*args)
        status = pull_xattr_blob_tdb_raw(eadb, mem_ctx, attribute, filename, 
                                                                         -1, 
100, &blob);
        if (!NT_STATUS_IS_OK(status) || blob.length < 0) {
+               PyErr_SetNTSTATUS(status);
                talloc_free(mem_ctx);
-               PyErr_NTSTATUS_IS_ERR_RAISE(status);
+               return NULL;
        }
        ret = PyString_FromStringAndSize((char *)blob.data, blob.length);
        talloc_free(mem_ctx);


-- 
Samba Shared Repository

Reply via email to