Skip to content
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

Update pokecli.py #5049

Merged
merged 1 commit into from
Sep 1, 2016
Merged

Update pokecli.py #5049

merged 1 commit into from
Sep 1, 2016

Conversation

sohje
Copy link
Contributor

@sohje sohje commented Sep 1, 2016

Short Description:

Check PgoApi version on bot start

Fixes/Resolves/Closes (please use correct syntax):

  • Prevent issues on outdated environments.

Check pgoapi version on startup

Check pgoapi version on startup
@mention-bot
Copy link

@sohje, thanks for your PR! By analyzing the annotation information on this pull request, we identified @douglascamata, @TheSavior and @mjmadsen to be potential reviewers

@rawgni
Copy link
Contributor

rawgni commented Sep 1, 2016

does this check the requirements.txt for version information or pip?

@sohje
Copy link
Contributor Author

sohje commented Sep 1, 2016

We dont have required version of pgoapi in requirements.txt, only commit hash.
A lot of issues appeared on pgoapi_version < 1.1.8

print 'Seems you forgot to install python modules.'
print 'Run: `pip install -r requirements.txt`'
sys.exit(1)
except ImportError as e:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this good to bypass missing import?

Copy link
Contributor Author

@sohje sohje Sep 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should bypass if import pkg_resources raises ImportError.
If no pgoapi installed, then pkg_resources.DistributionNotFound should raised.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, I understand. Thanks
👍

@solderzzc
Copy link
Contributor

solderzzc commented Sep 1, 2016

👍

Approved with PullApprove

@solderzzc solderzzc merged commit e30b359 into PokemonGoF:dev Sep 1, 2016
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.

4 participants