Skip to content

Skip version check if request fails #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheMythologist
Copy link

If getting of the latest version fails (due to Github API rate limiting or other reasons), the following error will be thrown:

~ gitmastery version
Traceback (most recent call last):
  File "main.py", line 6, in <module>
  File "app\cli.py", line 51, in start
  File "click\core.py", line 1442, in __call__
  File "click\core.py", line 1363, in main
  File "app\cli.py", line 18, in invoke
  File "click\core.py", line 1827, in invoke
  File "click\core.py", line 1226, in invoke
  File "click\core.py", line 794, in invoke
  File "click\decorators.py", line 34, in new_func
  File "app\cli.py", line 30, in cli
KeyError: 0
[PYI-15420:ERROR] Failed to execute script 'main' due to unhandled exception!

This PR fixes this error by only validating the version string if the request succeeds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant