Skip to content

Commit

Permalink
Merge pull request #5049 from sohje/patch-4
Browse files Browse the repository at this point in the history
Update pokecli.py
  • Loading branch information
solderzzc authored Sep 1, 2016
2 parents 6d84d89 + 83a1584 commit e30b359
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pokecli.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@
if sys.version_info >= (2, 7, 9):
ssl._create_default_https_context = ssl._create_unverified_context

try:
import pkg_resources
pgoapi_version = pkg_resources.get_distribution("pgoapi").version
if pgoapi_version < '1.1.8':
print "Run following command to get latest update: `pip install -r requirements.txt --upgrade`"
sys.exit(1)
except pkg_resources.DistributionNotFound:
print 'Seems you forgot to install python modules.'
print 'Run: `pip install -r requirements.txt`'
sys.exit(1)
except ImportError as e:
print e
pass

logging.basicConfig(
level=logging.INFO,
format='%(asctime)s [%(name)10s] [%(levelname)s] %(message)s')
Expand Down

0 comments on commit e30b359

Please sign in to comment.