Skip to content

Commit

Permalink
Add more debugging messages
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Nov 1, 2023
1 parent 77363b1 commit 80a0f27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/check-mirrors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,17 @@ jobs:
report += "|---|---|---|\n"
for mirror in mirrorlist:
mirror_url = f"http://{mirror}.generic-mapping-tools.org"
print(stderr, f"Checking {mirror_url}")
try:
r = requests.get(f"{mirror_url}/gmt_data_server.txt", headers={"User-Agent": "Mozilla/5.0"})
except requests.exceptions.ConnectionError:
print("ConnectionError exception"
error += 1
report += f"| [{mirror}]({mirror_url}) | Offline? | NA |\n"
continue
if r.status_code != 200: # Fail to get the file
print(f"Status code is {r.status_code}")
error += 1
report += f"| [{mirror}]({mirror_url}) | Offline? | NA |\n"
continue
Expand Down

0 comments on commit 80a0f27

Please sign in to comment.