From 3e22efa0bacd6b9aa3b0504de65430bdec26924d Mon Sep 17 00:00:00 2001 From: John R Barker Date: Wed, 14 Feb 2018 14:47:31 +0000 Subject: [PATCH] Ensure docs are valid before checking deprecation (#36160) --- test/sanity/validate-modules/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sanity/validate-modules/main.py b/test/sanity/validate-modules/main.py index 92c1ad2f496..89726b268bf 100755 --- a/test/sanity/validate-modules/main.py +++ b/test/sanity/validate-modules/main.py @@ -1235,7 +1235,7 @@ class ModuleValidator(Validator): doc_info, docs = self._validate_docs() # See if current version => deprecated.removed_in, ie, should be docs only - if 'deprecated' in docs and docs['deprecated'] is not None: + if docs and 'deprecated' in docs and docs['deprecated'] is not None: removed_in = docs.get('deprecated')['removed_in'] strict_ansible_version = StrictVersion('.'.join(ansible_version.split('.')[:2])) end_of_deprecation_should_be_docs_only = strict_ansible_version >= removed_in