Skip to content

Commit

Permalink
Merge pull request #316 from vss-2/master
Browse files Browse the repository at this point in the history
Fix not reaching download mirror #312
  • Loading branch information
rafapereirabr committed Sep 14, 2023
2 parents ea4b7b9 + 2b8d3f5 commit 8e10d2f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python-package/geobr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ def url_solver(url):

for url in urls:

response = requests.get(url)

if response.status_code == 200:
return response
try:
response = requests.get(url)
if response.status_code == 200:
return response
except:
continue

raise ConnectionError(
"No mirrors are active. Please report to https://github.com/ipeaGIT/geobr/issues"
Expand Down

0 comments on commit 8e10d2f

Please sign in to comment.