1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Cast version to string for comparisons

This commit is contained in:
Matt Martz 2015-12-22 11:15:54 -06:00 committed by John Barker
parent 8daaa75027
commit ccd49201b1

View file

@ -335,7 +335,7 @@ class ModuleValidator(Validator):
return
try:
version_added = StrictVersion(doc.get('version_added', '0.0'))
version_added = StrictVersion(str(doc.get('version_added', '0.0')))
except ValueError:
self.errors.append('version_added is not a valid version '
'number: %s' % version_added)