Fix broken validate-modules.

This commit is contained in:
Felix Fontein 2020-06-06 13:17:58 +02:00 committed by Matt Clay
parent 06efc41fb0
commit 3e566768c1

View file

@ -2094,7 +2094,7 @@ class ModuleValidator(Validator):
msg=('The deprecation version for a module must be added in this collection') msg=('The deprecation version for a module must be added in this collection')
) )
else: else:
removed_in = self.StrictVersion(str(version)) removed_in = self._create_strict_version(str(version))
except ValueError: except ValueError:
# ignore and hope we previouslly reported # ignore and hope we previouslly reported
@ -2102,7 +2102,7 @@ class ModuleValidator(Validator):
if removed_in: if removed_in:
if not self.collection: if not self.collection:
strict_ansible_version = self.StrictVersion('.'.join(ansible_version.split('.')[:2])) strict_ansible_version = self._create_strict_version('.'.join(ansible_version.split('.')[:2]))
end_of_deprecation_should_be_removed_only = strict_ansible_version >= removed_in end_of_deprecation_should_be_removed_only = strict_ansible_version >= removed_in
elif self.collection_version: elif self.collection_version:
strict_ansible_version = self.collection_version strict_ansible_version = self.collection_version