Skip to content

Commit 3076d4c

Browse files
committed
reduce timeout
1 parent 68c6fe6 commit 3076d4c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

submit50/__main__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def check_announcements():
6060
raise Error(res.text.strip())
6161

6262

63-
def check_version(package_name=__package__, timeout=30):
64-
"""Check that submit50 is the latest version according to submit50.io and PyPI."""
63+
def check_version(package_name=__package__, timeout=5):
64+
"""Check that submit50 is the latest version according to submit.cs50.io and PyPI."""
6565
if not __version__:
6666
return
6767

@@ -71,7 +71,7 @@ def check_version(package_name=__package__, timeout=30):
7171
raise Error(_("Could not connect to submit.cs50.io."
7272
"Please visit our status page https://cs50.statuspage.io for more information."))
7373

74-
# Get submit.cs50.io version
74+
# Get the minimum required version from submit.cs50.io
7575
latest_io = version.parse(res.text.strip())
7676
current = version.parse(__version__)
7777

@@ -84,7 +84,7 @@ def check_version(package_name=__package__, timeout=30):
8484

8585
# Check for minimum requirement
8686
if current < latest_io:
87-
raise Error(_(f"v{current} of {package_name} is no longer supported. Run pip3 install --upgrade {package_name} to upgrade."))
87+
raise Error(_(f"Current version {current} of {package_name} is no longer supported. Run pip3 install --upgrade {package_name} now to upgrade."))
8888

8989
# Check for latest version
9090
if latest_pypi > current:

0 commit comments

Comments
 (0)