We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2517a70 commit c9c2e0cCopy full SHA for c9c2e0c
dev/gendoc.py
@@ -54,7 +54,11 @@ def get_json(url):
54
request = Request(url)
55
if GITHUB_OAUTH_KEY:
56
request.add_header('Authorization', 'token %s' % GITHUB_OAUTH_KEY)
57
- return json.load(urlopen(request))
+
58
+ response = urlopen(request).read()
59
+ if isinstance(response, bytes):
60
+ response = response.decode('utf-8')
61
+ return json.loads(response)
62
except HTTPError as e:
63
if "X-RateLimit-Remaining" in e.headers and e.headers["X-RateLimit-Remaining"] == '0':
64
print("Exceeded the GitHub API rate limit; see the instructions in " +
0 commit comments