better error catching for doc build
This commit is contained in:
parent
76c8318351
commit
3a0bf55ae3
1 changed files with 5 additions and 1 deletions
|
@ -308,7 +308,11 @@ def process_module(module, options, env, template, outputname, module_map, alias
|
|||
doc['ansible_version'] = options.ansible_version
|
||||
doc['plainexamples'] = examples #plain text
|
||||
if returndocs:
|
||||
doc['returndocs'] = yaml.safe_load(returndocs)
|
||||
try:
|
||||
doc['returndocs'] = yaml.safe_load(returndocs)
|
||||
except:
|
||||
print("could not load yaml: %s" % returndocs)
|
||||
raise
|
||||
else:
|
||||
doc['returndocs'] = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue