Fix version_added validation when empty.

This commit is contained in:
Matt Clay 2018-01-10 12:52:51 -08:00
parent 784360385e
commit 513e0547b9

View file

@ -947,7 +947,7 @@ class ModuleValidator(Validator):
return
try:
version_added = StrictVersion(str(doc.get('version_added', '0.0')))
version_added = StrictVersion(str(doc.get('version_added', '0.0') or '0.0'))
except ValueError:
version_added = doc.get('version_added', '0.0')
self.reporter.error(