Skip to content

Commit

Permalink
Merge pull request #94 from openSUSE/fixup_old_packaging_version
Browse files Browse the repository at this point in the history
Treat LegacyVersion as InvalidVersion
  • Loading branch information
dirkmueller authored May 14, 2024
2 parents fe6061f + fa024e2 commit 9bfad97
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions set_version
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ def _version_python_pip2rpm(version_pip):

try:
v = parse(version_pip)
with suppress(NameError):
if isinstance(v, LegacyVersion):
raise InvalidVersion
except InvalidVersion:
# Maybe is converted already?
return None
Expand Down

0 comments on commit 9bfad97

Please sign in to comment.