Skip to content

Commit

Permalink
Support older python-requests. Relates to #46.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Jan 31, 2013
1 parent 22ce01b commit 9299919
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bugwarrior/services/githubutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ def _getter(url, auth):
raise IOError(
"Non-200 status code %r; %r" % (response.status_code, url))

results += response.json()
if callable(response.json):
# Newer python-requests
results += response.json()
else:
# Older python-requests
results += response.json

link = _link_field_to_dict(response.headers['link'])

return results
Expand Down

0 comments on commit 9299919

Please sign in to comment.