* 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>
(cherry picked from commit b0d9deeae3
)
Co-authored-by: Alan Rominger <arominge@redhat.com>
This commit is contained in:
parent
be28e98cf2
commit
155041d8ee
2 changed files with 8 additions and 0 deletions
2
changelogs/fragments/70507-validate-null-author.yaml
Normal file
2
changelogs/fragments/70507-validate-null-author.yaml
Normal file
|
@ -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):
|
||||
if value is None:
|
||||
return value # let schema checks handle
|
||||
|
||||
if not is_iterable(value):
|
||||
value = [value]
|
||||
|
||||
for line in value:
|
||||
if not isinstance(line, string_types):
|
||||
continue # let schema checks handle
|
||||
m = author_line.search(line)
|
||||
if not m:
|
||||
raise Invalid("Invalid author")
|
||||
|
||||
return value
|
||||
|
||||
|
||||
def doc_schema(module_name, for_collection=False, deprecated_module=False):
|
||||
|
||||
|
|
Loading…
Reference in a new issue