From a1a5a212985053fac141975f6f6cd8e30051b401 Mon Sep 17 00:00:00 2001 From: Jan Luebbe Date: Tue, 10 Mar 2015 14:46:21 +0100 Subject: Documentation: handle missing group declaration Use group 'misc' as a default and print a warning. Signed-off-by: Jan Luebbe --- Documentation/gen_commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Documentation/gen_commands.py') diff --git a/Documentation/gen_commands.py b/Documentation/gen_commands.py index b85e2e3eab..6251b4f22e 100755 --- a/Documentation/gen_commands.py +++ b/Documentation/gen_commands.py @@ -161,7 +161,11 @@ for name in CMDS.keys(): for name, cmd in CMDS.items(): #pprint({name: cmd}) rst = gen_rst(name, cmd) - subdir = os.path.join(sys.argv[2], cmd['c_group'][0]) + group = cmd.get('c_group') + if group is None: + print >> sys.stderr, "gen_commands: warning: using default group 'misc' for command '%s'" % name + group = ['misc'] + subdir = os.path.join(sys.argv[2], group[0]) try: os.makedirs(subdir) except OSError as e: -- cgit v1.2.3