From 3a0bf55ae3869af0f1a3b7b6dab9e39d9e8a44e3 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 12 Oct 2015 10:19:48 -0400 Subject: [PATCH] better error catching for doc build --- hacking/module_formatter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hacking/module_formatter.py b/hacking/module_formatter.py index 00c9f577902..e18aa8a837e 100755 --- a/hacking/module_formatter.py +++ b/hacking/module_formatter.py @@ -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