From 221c2b9f7c07a1d2a16a4d8cce18385d105aa177 Mon Sep 17 00:00:00 2001 From: juliannguyen4 <109386615+juliannguyen4@users.noreply.github.com> Date: Tue, 18 Jul 2023 13:13:53 -0700 Subject: [PATCH] remove useless code, put back python client specific errs --- src/main/client/admin.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/client/admin.c b/src/main/client/admin.c index d4df00a50e..9f2332d563 100644 --- a/src/main/client/admin.c +++ b/src/main/client/admin.c @@ -232,10 +232,6 @@ PyObject *AerospikeClient_Admin_Drop_User(AerospikeClient *self, PyObject *args, PyMem_Free(alias_to_search); alias_to_search = NULL; - if (err.code != AEROSPIKE_OK) { - goto CLEANUP; - } - CLEANUP: if (err.code != AEROSPIKE_OK) { @@ -639,9 +635,6 @@ PyObject *AerospikeClient_Admin_Revoke_Roles(AerospikeClient *self, aerospike_revoke_roles(self->as, &err, admin_policy_p, user, (const char **)roles, roles_size); Py_END_ALLOW_THREADS - if (err.code != AEROSPIKE_OK) { - goto CLEANUP; - } CLEANUP: for (int i = 0; i < roles_size; i++) { @@ -924,6 +917,10 @@ PyObject *AerospikeClient_Admin_Query_Users(AerospikeClient *self, // Convert returned array of as_user structs into python object; as_user_array_to_pyobject(&err, users, &py_users, users_size); + if (err.code != AEROSPIKE_OK) { + as_error_update(&err, err.code, NULL); + goto CLEANUP; + } CLEANUP: if (users) {