Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
task: support empty replies from DELETE method
  • Loading branch information
allisonkarlitskaya committed Jul 9, 2021
commit 1f7405877f8c7584f9d232118f3c7742b947498c
5 changes: 4 additions & 1 deletion task/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ def delete(self, resource, accept=[]):
if (status < 200 or status >= 300) and status not in accept:
raise GitHubError(self.qualify(resource), response)
self.cache.mark()
return json.loads(response['data'])
if response['data']:
return json.loads(response['data'])
else:
return None

def patch(self, resource, data, accept=[]):
response = self.request("PATCH", resource, json.dumps(data), {"Content-Type": "application/json"})
Expand Down