summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJan Luebbe <jlu@pengutronix.de>2015-03-10 14:46:21 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-10 15:04:23 +0100
commita1a5a212985053fac141975f6f6cd8e30051b401 (patch)
treea00db2a08fbee60e328d56784a0259b165d67f4c /Documentation
parent03b59bdb64e83ebcdb9111681775117ebce0e03b (diff)
downloadbarebox-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-xDocumentation/gen_commands.py6
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: