Skip to content

Commit

Permalink
Change JSON load method
Browse files Browse the repository at this point in the history
Replace "json.loads(r.text or r.content)" with the simpler, more official, "r.json()".
  • Loading branch information
MineRobber9000 authored Jun 27, 2016
1 parent 3371594 commit fb0fe7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion captainhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
doall = False
r = requests.get('https://api.github.com/orgs/%s/repos?per_page=100' % (org,), auth=auth)
if r.ok:
j = json.loads(r.text or r.content)
j = r.json()
for org in j:
name = org['name']
hurl = org['hooks_url']
Expand Down

0 comments on commit fb0fe7a

Please sign in to comment.