Skip to content

Commit

Permalink
remove useless code, put back python client specific errs
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Aug 28, 2023
1 parent df69144 commit 221c2b9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main/client/admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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++) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 221c2b9

Please sign in to comment.