Skip to content

Commit 584845e

Browse files
author
Naveen Kaje
committed
mbed: config: print detailed help in subcommand
Print detailed usage when unsupported arguments are supplied with mbed config subcommand
1 parent 52ed388 commit 584845e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mbed/mbed.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3249,9 +3249,13 @@ def config_(var=None, value=None, global_cfg=False, unset=False, list_config=Fal
32493249
action('%s now set as default %s in program "%s"' % (value, name, program.name))
32503250
else:
32513251
value = program.get_cfg(var)
3252-
action(('%s' % value) if value else 'No default %s set in program "%s"' % (name, program.name))
3252+
if value:
3253+
action(('%s' % value)
3254+
else:
3255+
action('No default %s set in program "%s"' % (name, program.name))
3256+
error("run with -h for detailed usage help")
32533257
else:
3254-
subcommands['config'].error("too few arguments")
3258+
error("Too few arguments. Run with -h for detailed help")
32553259

32563260

32573261
# Build system and exporters

0 commit comments

Comments
 (0)