Skip to content

Commit

Permalink
add timeout to request
Browse files Browse the repository at this point in the history
  • Loading branch information
clavedeluna committed Feb 18, 2024
1 parent 5ab6cc1 commit f1c1cf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codemodder/scripts/get_hashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def get_package_hashes(package_name: str, version: str) -> list[str]:
Fetch the SHA256 hashes for a given package version from PyPI.
"""
url = f"https://pypi.org/pypi/{package_name}/{version}/json"
response = requests.get(url)
response = requests.get(url, timeout=60)
hashes = []

if response.status_code == 200:
Expand Down

0 comments on commit f1c1cf8

Please sign in to comment.