If no version_added is found, we should assume the string 0.0 instead of the int 0

This commit is contained in:
Matt Martz 2015-11-24 10:27:45 -06:00 committed by John Barker
parent 8c6c2caf61
commit 99158a6a89

View file

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