better error catching for doc build

This commit is contained in:
Brian Coca 2015-10-12 10:19:48 -04:00
parent 76c8318351
commit 3a0bf55ae3

View file

@ -308,7 +308,11 @@ def process_module(module, options, env, template, outputname, module_map, alias
doc['ansible_version'] = options.ansible_version doc['ansible_version'] = options.ansible_version
doc['plainexamples'] = examples #plain text doc['plainexamples'] = examples #plain text
if returndocs: if returndocs:
try:
doc['returndocs'] = yaml.safe_load(returndocs) doc['returndocs'] = yaml.safe_load(returndocs)
except:
print("could not load yaml: %s" % returndocs)
raise
else: else:
doc['returndocs'] = None doc['returndocs'] = None