diff --git a/aerospike_helpers/operations/list_operations.py b/aerospike_helpers/operations/list_operations.py old mode 100755 new mode 100644 index 238929bd4a..5d946ffdf9 --- a/aerospike_helpers/operations/list_operations.py +++ b/aerospike_helpers/operations/list_operations.py @@ -339,12 +339,11 @@ def list_clear(bin_name: str, ctx: Optional[list] = None): A dictionary usable in :meth:`~aerospike.Client.operate` and :meth:`~aerospike.Client.operate_ordered`. The format of the dictionary should be considered an internal detail, and subject to change. """ - op_dict = {OP_KEY: aerospike.OP_LIST_CLEAR, BIN_KEY: bin_name} if ctx: - op_dict[CTX_KEY] = ctx + return {OP_KEY: aerospike.OP_LIST_CLEAR, BIN_KEY: bin_name, CTX_KEY: ctx} - return op_dict + return {OP_KEY: aerospike.OP_LIST_CLEAR, BIN_KEY: bin_name} def list_set(bin_name: str, index, value, policy: Optional[dict] = None, ctx: Optional[list] = None):