Skip to content

Commit 2e5b0aa

Browse files
committed
process rpberrorresp correctly
1 parent 4eec937 commit 2e5b0aa

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

riak/codecs/ttb.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def maybe_err_ttb(self, err_ttb):
4949
resp_a = err_ttb[0]
5050
if resp_a == rpberrorresp_a:
5151
errmsg = err_ttb[1]
52+
# errcode = err_ttb[2]
5253
raise RiakError(bytes_to_str(errmsg))
5354

5455
def maybe_riak_error(self, msg_code, data=None):
@@ -151,10 +152,10 @@ def decode_timeseries(self, resp_ttb, tsobj):
151152
if resp_ttb is None:
152153
return tsobj
153154

155+
self.maybe_err_ttb(resp_ttb)
156+
154157
resp_a = resp_ttb[0]
155-
if resp_a == rpberrorresp_a:
156-
self.process_err_ttb(resp_ttb)
157-
elif resp_a == tsputresp_a:
158+
if resp_a == tsputresp_a:
158159
return
159160
elif resp_a == tsgetresp_a or resp_a == tsqueryresp_a:
160161
resp_data = resp_ttb[1]

0 commit comments

Comments
 (0)