mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-17 20:54:38 +03:00
Fix behavior that getUrl() does not retry
getUrl() now use `requests.get()` that is default getter that does not retry. This change corrects it to `session.get()` Related issue #472 Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
@@ -57,7 +57,7 @@ def getUrl(url: str, timeout) -> str:
|
||||
session.mount("http://", adapter)
|
||||
session.mount("https://", adapter)
|
||||
try:
|
||||
r = requests.get(url, allow_redirects=False, timeout=timeout)
|
||||
r = session.get(url, allow_redirects=False, timeout=timeout)
|
||||
num_redirects = 0
|
||||
while 300 < r.status_code < 309 and num_redirects < 10:
|
||||
num_redirects += 1
|
||||
|
||||
Reference in New Issue
Block a user