diff options
author | Brian Coca <brian.coca+git@gmail.com> | 2016-02-08 18:33:54 +0100 |
---|---|---|
committer | Brian Coca <brian.coca+git@gmail.com> | 2016-02-08 18:34:26 +0100 |
commit | 6414c967e4399f38ceb344d5d944cfb8df696acb (patch) | |
tree | 1751360f9ab0c30900edf079a6f2bbc2fb127ddc /hacking | |
parent | Merge pull request #13883 from shaba/devel (diff) | |
download | ansible-6414c967e4399f38ceb344d5d944cfb8df696acb.tar.xz ansible-6414c967e4399f38ceb344d5d944cfb8df696acb.zip |
now check for description and listify if needed
fixes #14371
Diffstat (limited to 'hacking')
-rwxr-xr-x | hacking/module_formatter.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/hacking/module_formatter.py b/hacking/module_formatter.py index 43b76ae71b..011bfd53c4 100755 --- a/hacking/module_formatter.py +++ b/hacking/module_formatter.py @@ -23,14 +23,9 @@ import os import glob import sys import yaml -import codecs -import json -import ast import re import optparse -import time import datetime -import subprocess import cgi import warnings from jinja2 import Environment, FileSystemLoader @@ -302,6 +297,11 @@ def process_module(module, options, env, template, outputname, module_map, alias # don't show version added information if it's too old to be called out if 'version_added' in doc['options'][k] and too_old(doc['options'][k]['version_added']): del doc['options'][k]['version_added'] + if not 'description' in doc['options'][k]: + raise AnsibleError("Missing required description for option %s in %s " % (k, module)) + if not isinstance(doc['options'][k]['description'],list): + doc['options'][k]['description'] = [doc['options'][k]['description']] + all_keys.append(k) all_keys = sorted(all_keys) @@ -451,7 +451,6 @@ def main(): env, template, outputname = jinja2_environment(options.template_dir, options.type) categories = list_modules(options.module_dir) - last_category = None category_names = list(categories.keys()) category_names.sort() |