Skip to content

Commit

Permalink
fix: don't crash when dsp-tools is run offline (DEV-3338) (#833)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Feb 27, 2024
1 parent 0c9d077 commit 901b86d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dsp_tools/cli/entry_point.py
Expand Up @@ -80,7 +80,10 @@ def run(args: list[str]) -> None:

def _check_version() -> None:
"""Check if the installed version of dsp-tools is up-to-date. If not, print a warning message."""
response = requests.get("https://pypi.org/pypi/dsp-tools/json", timeout=15)
try:
response = requests.get("https://pypi.org/pypi/dsp-tools/json", timeout=15)
except requests.ConnectionError:
return
if not response.ok:
return
latest = parse(response.json()["info"]["version"])
Expand Down

0 comments on commit 901b86d

Please sign in to comment.