Skip to content

Commit

Permalink
bugfix: handle DELETE response 204 when no content type is set
Browse files Browse the repository at this point in the history
  • Loading branch information
alonswartz committed Jun 26, 2013
1 parent 4162ec7 commit ebd4c14
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion octohub/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def parse_response(response):
if content_type == 'application/json':
response.parsed = parse_element(response.json())
else:
raise OctoHubError('unhandled content_type: %s' % content_type)
if not response.status_code == 204:
raise OctoHubError('unhandled content_type: %s' % content_type)

if not response.status_code in (200, 201, 204):
raise ResponseError(response.parsed)
Expand Down

0 comments on commit ebd4c14

Please sign in to comment.