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

Fix no metadata traceback in validate-modules.

This commit is contained in:
Matt Clay 2018-12-19 00:16:38 -08:00
parent 65ce1b727e
commit 97de7c133e

View file

@ -1459,7 +1459,7 @@ class ModuleValidator(Validator):
doc_info, docs = self._validate_docs()
# See if current version => deprecated.removed_in, ie, should be docs only
if 'removed' in ast.literal_eval(doc_info['ANSIBLE_METADATA']['value'])['status']:
if isinstance(doc_info['ANSIBLE_METADATA']['value'], ast.Dict) and 'removed' in ast.literal_eval(doc_info['ANSIBLE_METADATA']['value'])['status']:
end_of_deprecation_should_be_removed_only = True
elif docs and 'deprecated' in docs and docs['deprecated'] is not None:
try: