diff options
| author | 2018-11-10 14:14:14 +0100 | |
|---|---|---|
| committer | 2018-11-10 14:14:14 +0100 | |
| commit | 57a8078fd5a322a03f1d1979574a17736f9222ae (patch) | |
| tree | 09ea2fb2b567eb82da171b8a5beaeda8d3ba7d78 | |
| parent | Remove obsolete error handler. (diff) | |
Return `None` on `delete` status 204.
| -rw-r--r-- | bot/api.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/api.py b/bot/api.py index 04b684b38..f8757d3d0 100644 --- a/bot/api.py +++ b/bot/api.py @@ -35,4 +35,6 @@ class APIClient: async def delete(self, endpoint: str, *args, **kwargs): async with self.session.delete(self._url_for(endpoint), *args, **kwargs) as resp: + if resp.status == 204: + return None return await resp.json() |