diff options
author | Jan Luebbe <jlu@pengutronix.de> | 2015-03-10 14:46:21 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-03-10 15:04:23 +0100 |
commit | a1a5a212985053fac141975f6f6cd8e30051b401 (patch) | |
tree | a00db2a08fbee60e328d56784a0259b165d67f4c /Documentation | |
parent | 03b59bdb64e83ebcdb9111681775117ebce0e03b (diff) | |
download | barebox-a1a5a212985053fac141975f6f6cd8e30051b401.tar.gz barebox-a1a5a212985053fac141975f6f6cd8e30051b401.tar.xz |
Documentation: handle missing group declaration
Use group 'misc' as a default and print a warning.
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Diffstat (limited to 'Documentation')
-rwxr-xr-x | Documentation/gen_commands.py | 6 |
1 files changed, 5 insertions, 1 deletions
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: |