Skip to content

Commit

Permalink
fix: replace print debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
terriko committed Oct 25, 2023
1 parent da64ba8 commit 3cd0063
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cve_bin_tool/version_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
"""


class CannotParseVersionException(Exception):
"""
Thrown if the version doesn't comply with our expectations
"""

def parse_version(version_string: str):
"""
Splits a version string into an array for comparison.
Expand Down Expand Up @@ -54,11 +59,11 @@ def parse_version(version_string: str):
versionArray.append(result[0][0])
versionArray.append(result[0][1])
else:
print(f"Cannot parse version {version_string}")
raise CannotParseVersionException(f"version string = {versionString}")

# If all else fails, complain
else:
print(f"What is {section} supposed to be?")
raise CannotParseVersionException(f"version string = {versionString}")

return versionArray

Expand Down

0 comments on commit 3cd0063

Please sign in to comment.