mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix exception in module validator.
This commit is contained in:
parent
bce0bd401e
commit
6580fb2cd1
1 changed files with 7 additions and 1 deletions
|
@ -428,9 +428,15 @@ class ModuleValidator(Validator):
|
||||||
|
|
||||||
for error in errors:
|
for error in errors:
|
||||||
path = [str(p) for p in error.path]
|
path = [str(p) for p in error.path]
|
||||||
|
|
||||||
|
if isinstance(error.data, dict):
|
||||||
|
error_message = humanize_error(error.data, error)
|
||||||
|
else:
|
||||||
|
error_message = error
|
||||||
|
|
||||||
self.errors.append('%s.%s: %s' %
|
self.errors.append('%s.%s: %s' %
|
||||||
(name, '.'.join(path),
|
(name, '.'.join(path),
|
||||||
humanize_error(error.data, error)))
|
error_message))
|
||||||
|
|
||||||
def _validate_docs(self):
|
def _validate_docs(self):
|
||||||
doc_info = self._get_docs()
|
doc_info = self._get_docs()
|
||||||
|
|
Loading…
Reference in a new issue