diff --git a/set_version b/set_version index 68f9d25..22a8a00 100755 --- a/set_version +++ b/set_version @@ -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