diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/pydsdb.c | 10 | ||||
-rw-r--r-- | source4/lib/registry/pyregistry.c | 24 | ||||
-rw-r--r-- | source4/libcli/util/pyerrors.h | 2 |
3 files changed, 18 insertions, 18 deletions
diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index b9e1dd742c..355804943c 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -591,7 +591,7 @@ static PyObject *py_dsdb_DsReplicaAttribute(PyObject *self, PyObject *args) } werr = a->syntax->ldb_to_drsuapi(&syntax_ctx, a, el, attr, attr); - PyErr_WERROR_IS_ERR_RAISE(werr); + PyErr_WERROR_NOT_OK_RAISE(werr); ret = py_return_ndr_struct("samba.dcerpc.drsuapi", "DsReplicaAttribute", attr, attr); @@ -702,11 +702,11 @@ static PyObject *py_dsdb_normalise_attributes(PyObject *self, PyObject *args) } werr = a->syntax->ldb_to_drsuapi(&syntax_ctx, a, el, attr, attr); - PyErr_WERROR_IS_ERR_RAISE(werr); + PyErr_WERROR_NOT_OK_RAISE(werr); /* now convert back again */ werr = a->syntax->drsuapi_to_ldb(&syntax_ctx, a, attr, el, el); - PyErr_WERROR_IS_ERR_RAISE(werr); + PyErr_WERROR_NOT_OK_RAISE(werr); ret = py_return_ndr_struct("ldb", "MessageElement", el, el); @@ -860,7 +860,7 @@ static PyObject *py_dsdb_set_schema_from_ldif(PyObject *self, PyObject *args) PyErr_LDB_OR_RAISE(py_ldb, ldb); result = dsdb_set_schema_from_ldif(ldb, pf, df, dn); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); Py_RETURN_NONE; } @@ -911,7 +911,7 @@ static PyObject *py_dsdb_write_prefixes_from_schema_to_ldb(PyObject *self, PyObj } result = dsdb_write_prefixes_from_schema_to_ldb(NULL, ldb, schema); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); Py_RETURN_NONE; } diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c index 2e8b95f6e3..ad411e846d 100644 --- a/source4/lib/registry/pyregistry.c +++ b/source4/lib/registry/pyregistry.c @@ -49,7 +49,7 @@ static PyObject *py_get_predefined_key_by_name(PyObject *self, PyObject *args) return NULL; result = reg_get_predefined_key_by_name(ctx, name, &key); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); return pytalloc_steal(&PyRegistryKey, key); } @@ -64,7 +64,7 @@ static PyObject *py_key_del_abs(PyObject *self, PyObject *args) return NULL; result = reg_key_del_abs(ctx, path); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); Py_RETURN_NONE; } @@ -80,7 +80,7 @@ static PyObject *py_get_predefined_key(PyObject *self, PyObject *args) return NULL; result = reg_get_predefined_key(ctx, hkey, &key); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); return pytalloc_steal(&PyRegistryKey, key); } @@ -94,7 +94,7 @@ static PyObject *py_diff_apply(PyObject *self, PyObject *args) return NULL; result = reg_diff_apply(ctx, filename); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); Py_RETURN_NONE; } @@ -127,7 +127,7 @@ static PyObject *py_mount_hive(PyObject *self, PyObject *args) SMB_ASSERT(ctx != NULL); result = reg_mount_hive(ctx, PyHiveKey_AsHiveKey(py_hivekey), hkey, elements); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); Py_RETURN_NONE; } @@ -137,7 +137,7 @@ static PyObject *registry_new(PyTypeObject *type, PyObject *args, PyObject *kwar WERROR result; struct registry_context *ctx; result = reg_open_local(NULL, &ctx); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); return pytalloc_steal(&PyRegistry, ctx); } @@ -175,7 +175,7 @@ static PyObject *py_hive_key_del(PyObject *self, PyObject *args) result = hive_key_del(NULL, key, name); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); Py_RETURN_NONE; } @@ -186,7 +186,7 @@ static PyObject *py_hive_key_flush(PyObject *self) struct hive_key *key = PyHiveKey_AsHiveKey(self); result = hive_key_flush(key); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); Py_RETURN_NONE; } @@ -202,7 +202,7 @@ static PyObject *py_hive_key_del_value(PyObject *self, PyObject *args) result = hive_key_del_value(NULL, key, name); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); Py_RETURN_NONE; } @@ -226,7 +226,7 @@ static PyObject *py_hive_key_set_value(PyObject *self, PyObject *args) else result = hive_key_del_value(NULL, key, name); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); Py_RETURN_NONE; } @@ -291,7 +291,7 @@ static PyObject *py_open_hive(PyTypeObject *type, PyObject *args, PyObject *kwar tevent_context_init(NULL), lp_ctx, &hive_key); talloc_free(mem_ctx); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); return pytalloc_steal(&PyHiveKey, hive_key); } @@ -403,7 +403,7 @@ static PyObject *py_open_ldb_file(PyObject *self, PyObject *args, PyObject *kwar result = reg_open_ldb_file(NULL, location, session_info, credentials, s4_event_context_init(NULL), lp_ctx, &key); talloc_free(mem_ctx); - PyErr_WERROR_IS_ERR_RAISE(result); + PyErr_WERROR_NOT_OK_RAISE(result); return pytalloc_steal(&PyHiveKey, key); } diff --git a/source4/libcli/util/pyerrors.h b/source4/libcli/util/pyerrors.h index 4c526c6ed2..e3e7bc4aac 100644 --- a/source4/libcli/util/pyerrors.h +++ b/source4/libcli/util/pyerrors.h @@ -38,7 +38,7 @@ return NULL; \ } -#define PyErr_WERROR_IS_ERR_RAISE(status) \ +#define PyErr_WERROR_NOT_OK_RAISE(status) \ if (!W_ERROR_IS_OK(status)) { \ PyErr_SetWERROR(status); \ return NULL; \ |