Skip to content

Commit

Permalink
Merge pull request #309 from piwheels/300-pypi-redirects
Browse files Browse the repository at this point in the history
Handle TooManyRedirects in pypi_package_description
  • Loading branch information
waveform80 committed May 6, 2022
2 parents 4331b64 + d880fc5 commit 7ca1335
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions piwheels/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,9 @@ def pypi_package_description(package, pypi_url='https://pypi.org/pypi'):
# which means we're hammering PyPI too much; give up for now and
# assume we'll pick it up later
return None
except requests.exceptions.TooManyRedirects:
# Too many redirects; again just return None as above
return None
except requests.HTTPError as exc:
if exc.response.status_code >= 500:
# Server side error; probably a temporary service failure.
Expand Down

0 comments on commit 7ca1335

Please sign in to comment.