Skip to content

Commit 3b54cc9

Browse files
authored
Correct pagnation code to send bytes object
When reaching into the internals of the requests lib, the previous code screwed up the _content by converting it from bytes to str. There was a commit to apparently try to fix this, but it did not work. Now it does.
1 parent 497c281 commit 3b54cc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coinbase/wallet/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ def _get(self, *args, **kwargs):
152152
# next_uri is None when the cursor has been iterated to the last element
153153
content['data'].extend(prev_data)
154154
# If resp._content was is a bytes object, only set it as a bytes object
155-
if isinstance(resp_content, bytes):
156-
resp._content = json.dumps(content).decode('utf-8')
155+
if isinstance(resp._content, bytes):
156+
resp._content = json.dumps(content).encode('utf-8')
157157
else:
158158
resp._content = json.dumps(content)
159159
return resp

0 commit comments

Comments
 (0)