Skip to content

Commit

Permalink
gitlab: use the proper json result
Browse files Browse the repository at this point in the history
  • Loading branch information
mathstuf committed Oct 27, 2015
1 parent 18771ad commit 095ac8b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions bugwarrior/services/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,17 @@ def _fetch(self, tmpl, **kwargs):

response = requests.get(url, headers=headers, **kwargs)

if callable(response.json):
json_res = response.json()
else:
json_res = response.json

if response.status_code != 200:
raise IOError(
"Non-200 status code %r; %r; %r" %(
response.status_code, url, response.json))
response.status_code, url, json_res))

if callable(response.json):
return response.json()
else:
return response.json
return json_res

def _fetch_paged(self, tmpl):
params = {
Expand Down

0 comments on commit 095ac8b

Please sign in to comment.