We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e61cd02 + 22be37f commit 3e7c564Copy full SHA for 3e7c564
1 file changed
src/fromager/http_retry.py
@@ -18,6 +18,7 @@
18
import random
19
import time
20
import typing
21
+from urllib.parse import urlparse
22
23
import requests
24
from requests.adapters import HTTPAdapter
@@ -156,7 +157,7 @@ def send(
156
157
if (
158
response.status_code == 403
159
and request.url is not None
- and "api.github.com" in request.url
160
+ and urlparse(request.url).hostname == "api.github.com"
161
and "rate limit" in response.text.lower()
162
):
163
self._handle_github_rate_limit(response, attempt, max_attempts)
0 commit comments