Skip to content

Commit

Permalink
Merge pull request #82 from tekktrik/master
Browse files Browse the repository at this point in the history
Protect against TypeError if project not on PyPI
  • Loading branch information
dvershinin committed Jun 19, 2022
2 parents 1815a6b + c261f60 commit 148dce5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lastversion/PypiRepoSession.py
Expand Up @@ -54,6 +54,9 @@ def get_latest(self, pre_ok=False, major=None):
# we are in "enriching" project dict with desired version information
# and return None if there's no matching version
from .Version import Version
if self.project is None:
print("Project is not listed on PyPI")
return None
if not major:
latest_ver = self.project['info']['version']
v = Version(latest_ver)
Expand Down

0 comments on commit 148dce5

Please sign in to comment.