Fix ansible-test error in community.aws (#70507)

* Fix ansible-test error in community.aws

* Add changelog entry for fix

* Change check from None to string_types

* Update changelogs/fragments/70507-validate-null-author.yaml

clarify wording "or a list of strings"

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/schema.py

clarify wording - single string or not specified valid

Co-authored-by: Felix Fontein <felix@fontein.de>

* Do not fail but return None when given outside list

Co-authored-by: Felix Fontein <felix@fontein.de>
pull/70537/head
Alan Rominger 4 years ago committed by GitHub
parent 8aca464b8b
commit b0d9deeae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- Fixes ansible-test traceback when plugin author is not a string or a list of strings (https://github.com/ansible/ansible/pull/70507)

@ -412,15 +412,21 @@ def deprecation_schema(for_collection):
def author(value): def author(value):
if value is None:
return value # let schema checks handle
if not is_iterable(value): if not is_iterable(value):
value = [value] value = [value]
for line in value: for line in value:
if not isinstance(line, string_types):
continue # let schema checks handle
m = author_line.search(line) m = author_line.search(line)
if not m: if not m:
raise Invalid("Invalid author") raise Invalid("Invalid author")
return value
def doc_schema(module_name, for_collection=False, deprecated_module=False): def doc_schema(module_name, for_collection=False, deprecated_module=False):

Loading…
Cancel
Save