Skip to content

Commit aeaea79

Browse files
committed
avoid decoding response
1 parent 364d157 commit aeaea79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clever/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ def request_raw(self, meth, url, params={}):
292292
def interpret_response(self, http_res):
293293
rbody, rcode= http_res['body'], http_res['code']
294294
try:
295-
resp = json.loads(rbody.decode()) if rcode != 429 else {'error': 'Too Many Requests'}
295+
resp = json.loads(rbody) if rcode != 429 else {'error': 'Too Many Requests'}
296296
except Exception:
297297
raise APIError("Invalid response body from API: %s (HTTP response code was %d)" %
298298
(rbody, rcode), rbody, rcode)

0 commit comments

Comments
 (0)