Skip to content

Commit

Permalink
Simply getAFdata timeout message
Browse files Browse the repository at this point in the history
Raise a new exception without the full details from requests.
Avoids overwhelming the user
  • Loading branch information
DAWells committed Oct 14, 2024
1 parent bff71c4 commit 6133e91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HLAfreq/HLAfreq.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def getAFdata(base_url, timeout=20, format=True, ignoreG=True):
except requests.exceptions.ReadTimeout as e:
raise Exception(
"Requests timeout, try a larger `timeout` value for `getAFdata()`"
) from e
) from None
# How many pages of results
N = Npages(bs)
print("%s pages of results" % N)
Expand All @@ -271,7 +271,7 @@ def getAFdata(base_url, timeout=20, format=True, ignoreG=True):
except requests.exceptions.ReadTimeout as e:
raise Exception(
"Requests timeout, try a larger `timeout` value for `getAFdata()`"
) from e
) from None
tab = parseAF(bs)
tabs.append(tab)
print("Download complete")
Expand Down

0 comments on commit 6133e91

Please sign in to comment.