Fix local variable 'version_added' referenced before assignment. Fixes #15

This commit is contained in:
Matt Martz 2016-01-18 18:27:56 -06:00 committed by John Barker
parent f0e769e125
commit ab74928259

View file

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