Skip to content

Commit

Permalink
Merge pull request #113 from iamdefinitelyahuman/fix-unexpected-version
Browse files Browse the repository at this point in the history
Handle non-standard tags from Github API
  • Loading branch information
iamdefinitelyahuman authored Nov 20, 2020
2 parents ebeb5c7 + 01d53a5 commit 5531db5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion solcx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,12 @@ def get_compilable_solc_versions(headers: Optional[Dict] = None) -> List[Version
raise ConnectionError(msg)

for release in data.json():
version = Version.coerce(release["tag_name"].lstrip("v"))
try:
version = Version.coerce(release["tag_name"].lstrip("v"))
except ValueError:
# ignore non-standard releases (e.g. the 0.8.x preview)
continue

asset = next((i for i in release["assets"] if re.match(pattern, i["name"])), False)
if asset:
version_list.append(version)
Expand Down

0 comments on commit 5531db5

Please sign in to comment.