Skip to content

Commit

Permalink
Fix handling of 204 response (#45)
Browse files Browse the repository at this point in the history
* Fix case when result is None in check_response

* return directly from check_response when 204
  • Loading branch information
vlebourl authored Sep 4, 2020
1 parent 9e56cff commit 9acb664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyhoma/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ async def __delete(self, endpoint: str) -> None:
@staticmethod
async def check_response(response: ClientResponse) -> None:
""" Check the response returned by the TaHoma API"""
if response.status == 200:
if response.status in [200, 204]:
return

try:
Expand Down

0 comments on commit 9acb664

Please sign in to comment.