We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bdf304 commit 74dc0d0Copy full SHA for 74dc0d0
adabot/github_requests.py
@@ -58,9 +58,10 @@ def _fix_kwargs(kwargs):
58
59
def get(url, **kwargs):
60
response = requests.get(_fix_url(url), **_fix_kwargs(kwargs))
61
- remaining = int(response.headers["X-RateLimit-Remaining"])
62
- if remaining % 100 == 0:
63
- print(remaining, "requests remaining this hour")
+ if "X-RateLimit-Remaining" in response.headers:
+ remaining = int(response.headers["X-RateLimit-Remaining"])
+ if remaining % 100 == 0:
64
+ print(remaining, "requests remaining this hour")
65
return response
66
67
def post(url, **kwargs):
0 commit comments