Kaydet (Commit) fea6f1c1 authored tarafından Aanand Prasad's avatar Aanand Prasad

Remove redundant status code check from _result()

üst 5a2edc18
......@@ -114,8 +114,8 @@ class Client(requests.Session):
raise APIError(e, response=response, explanation=explanation)
def _result(self, response, json=False):
if response.status_code != 200 and response.status_code != 201:
self._raise_for_status(response)
self._raise_for_status(response)
if json:
return response.json()
return response.text
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment