Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Sep 18, 2024
1 parent 10e7532 commit cbe2967
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/main/client/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,21 @@ static bool AerospikeClient_InfoAll_each(as_error *err, const as_node *node,
Py_DECREF(py_res);

CLEANUP:
if (udata_ptr->error.code != AEROSPIKE_OK) {
// TODO
raise_exception(&udata_ptr->error);
PyGILState_Release(gil_state);
return false;
}
if (err->code != AEROSPIKE_OK) {
// TODO
raise_exception(err);
PyGILState_Release(gil_state);
return false;
bool result = true;
if (udata_ptr->error.code != AEROSPIKE_OK || err->code != AEROSPIKE_OK) {
as_error *error;
if (udata_ptr->error.code != AEROSPIKE_OK) {
error = &udata_ptr->error;
}
else {
error = err;
}
raise_exception(error);
result = false;
}

PyGILState_Release(gil_state);
return true;
return result;
}

/**
Expand Down

0 comments on commit cbe2967

Please sign in to comment.