mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
validate-modules improve empty version_added handling (#53177)
* Improve empty version_added handling * Remove unrelated ignore
This commit is contained in:
parent
29c9b4001d
commit
f0a63e783d
1 changed files with 5 additions and 4 deletions
|
@ -1370,7 +1370,8 @@ class ModuleValidator(Validator):
|
|||
return
|
||||
|
||||
try:
|
||||
mod_version_added = StrictVersion(
|
||||
mod_version_added = StrictVersion()
|
||||
mod_version_added.parse(
|
||||
str(existing_doc.get('version_added', '0.0'))
|
||||
)
|
||||
except ValueError:
|
||||
|
@ -1415,11 +1416,11 @@ class ModuleValidator(Validator):
|
|||
continue
|
||||
|
||||
try:
|
||||
version_added = StrictVersion(
|
||||
version_added = StrictVersion()
|
||||
version_added.parse(
|
||||
str(details.get('version_added', '0.0'))
|
||||
)
|
||||
version_added.version
|
||||
except (ValueError, AttributeError):
|
||||
except ValueError:
|
||||
version_added = details.get('version_added', '0.0')
|
||||
self.reporter.error(
|
||||
path=self.object_path,
|
||||
|
|
Loading…
Reference in a new issue