Skip to content

Commit

Permalink
fix: surprise edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
terriko committed Oct 26, 2023
1 parent c3fe67f commit 0863e31
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cve_bin_tool/version_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ def parse_version(version_string: str):
# we could switch to a re split but it seems to leave blanks so this is less hassle
versionString = versionString.replace("-", ".")
versionString = versionString.replace("_", ".")
versionString = versionString.replace(":", ".")
versionString = versionString.replace("+", ".")

# Attempt a split
split_version = versionString.split(".")
Expand Down Expand Up @@ -72,7 +70,8 @@ def parse_version(version_string: str):

# If all else fails, complain
else:
raise CannotParseVersionException(f"version string = {versionString}")
if (versionString != "."):
raise CannotParseVersionException(f"version string = {versionString}")

return versionArray

Expand Down

0 comments on commit 0863e31

Please sign in to comment.