Skip to content

Commit 6548e80

Browse files
committed
enh(cli): Add timeouts of 1.0s to the requests for version checking
1 parent ca35039 commit 6548e80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fmriprep/cli/_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def check_latest():
3838

3939
if latest is None or outdated is True:
4040
try:
41-
response = requests.get(url='https://pypi.org/pypi/fmriprep/json')
41+
response = requests.get(url='https://pypi.org/pypi/fmriprep/json', timeout=1.0)
4242
except Exception:
4343
pass
4444

@@ -65,7 +65,7 @@ def is_flagged():
6565
flagged = tuple()
6666
try:
6767
response = requests.get(url="""\
68-
https://raw.githubusercontent.com/poldracklab/fmriprep/master/.versions.json""")
68+
https://raw.githubusercontent.com/poldracklab/fmriprep/master/.versions.json""", timeout=1.0)
6969
except Exception:
7070
pass
7171

0 commit comments

Comments
 (0)