diff options
author | Stefan Metzmacher <metze@samba.org> | 2020-12-09 10:13:54 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2020-12-17 13:59:38 +0000 |
commit | 084c22403f0042f9cb6c5af6651cc9ef8b5f3bd0 (patch) | |
tree | dd862e80b1466aa7493051dfb473fd58de552d2e /source3/libsmb | |
parent | 560e4b1b32f56ed4cfffc60efd9199ed435409ba (diff) | |
download | samba-084c22403f0042f9cb6c5af6651cc9ef8b5f3bd0.tar.gz |
s3:pylibsmb: PyErr_NTSTATUS_IS_ERR_RAISE => PyErr_NTSTATUS_NOT_OK_RAISE
We want to raise an exception for everything that's not NT_STATUS_OK.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/pylibsmb.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index b84685b55f9..b204f9fa1cc 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -834,7 +834,7 @@ static PyObject *py_smb_savefile(struct py_cli_state *self, PyObject *args) } status = cli_ntcreate_recv(req, &fnum, NULL); TALLOC_FREE(req); - PyErr_NTSTATUS_IS_ERR_RAISE(status); + PyErr_NTSTATUS_NOT_OK_RAISE(status); /* write the new file contents */ state.data = data; @@ -848,7 +848,7 @@ static PyObject *py_smb_savefile(struct py_cli_state *self, PyObject *args) } status = cli_push_recv(req); TALLOC_FREE(req); - PyErr_NTSTATUS_IS_ERR_RAISE(status); + PyErr_NTSTATUS_NOT_OK_RAISE(status); /* close the file handle */ req = cli_close_send(NULL, self->ev, self->cli, fnum); @@ -856,7 +856,7 @@ static PyObject *py_smb_savefile(struct py_cli_state *self, PyObject *args) return NULL; } status = cli_close_recv(req); - PyErr_NTSTATUS_IS_ERR_RAISE(status); + PyErr_NTSTATUS_NOT_OK_RAISE(status); Py_RETURN_NONE; } @@ -945,11 +945,11 @@ static PyObject *py_smb_loadfile(struct py_cli_state *self, PyObject *args) } status = cli_ntcreate_recv(req, &fnum, NULL); TALLOC_FREE(req); - PyErr_NTSTATUS_IS_ERR_RAISE(status); + PyErr_NTSTATUS_NOT_OK_RAISE(status); /* get a buffer to hold the file contents */ status = py_smb_filesize(self, fnum, &size); - PyErr_NTSTATUS_IS_ERR_RAISE(status); + PyErr_NTSTATUS_NOT_OK_RAISE(status); result = PyBytes_FromStringAndSize(NULL, size); if (result == NULL) { @@ -1312,7 +1312,7 @@ static PyObject *py_smb_rmdir(struct py_cli_state *self, PyObject *args) } status = cli_rmdir_recv(req); TALLOC_FREE(req); - PyErr_NTSTATUS_IS_ERR_RAISE(status); + PyErr_NTSTATUS_NOT_OK_RAISE(status); Py_RETURN_NONE; } @@ -1336,7 +1336,7 @@ static PyObject *py_smb_mkdir(struct py_cli_state *self, PyObject *args) } status = cli_mkdir_recv(req); TALLOC_FREE(req); - PyErr_NTSTATUS_IS_ERR_RAISE(status); + PyErr_NTSTATUS_NOT_OK_RAISE(status); Py_RETURN_NONE; } @@ -1390,7 +1390,7 @@ static PyObject *py_smb_get_sd(struct py_cli_state *self, PyObject *args) return false; } status = cli_query_security_descriptor_recv(req, NULL, &sd); - PyErr_NTSTATUS_IS_ERR_RAISE(status); + PyErr_NTSTATUS_NOT_OK_RAISE(status); return py_return_ndr_struct( "samba.dcerpc.security", "descriptor", sd, sd); @@ -1424,7 +1424,7 @@ static PyObject *py_smb_set_sd(struct py_cli_state *self, PyObject *args) } status = cli_set_security_descriptor_recv(req); - PyErr_NTSTATUS_IS_ERR_RAISE(status); + PyErr_NTSTATUS_NOT_OK_RAISE(status); Py_RETURN_NONE; } |