From bd12d9a6943fb41d28a22d3ef9bbe4ddc0974e9c Mon Sep 17 00:00:00 2001 From: Naveen Kaje Date: Mon, 4 Mar 2019 14:44:29 -0600 Subject: [PATCH] mbed: config: print detailed help in subcommand Print detailed usage when unsupported arguments are supplied with mbed config subcommand --- mbed/mbed.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mbed/mbed.py b/mbed/mbed.py index d6c7eb37..a85b459a 100755 --- a/mbed/mbed.py +++ b/mbed/mbed.py @@ -3249,9 +3249,13 @@ def config_(var=None, value=None, global_cfg=False, unset=False, list_config=Fal action('%s now set as default %s in program "%s"' % (value, name, program.name)) else: value = program.get_cfg(var) - action(('%s' % value) if value else 'No default %s set in program "%s"' % (name, program.name)) + if value: + action('%s' % value) + else: + action('No default %s set in program "%s"' % (name, program.name)) + error("run with -h for detailed usage help") else: - subcommands['config'].error("too few arguments") + error("Too few arguments. Run with -h for detailed help") # Build system and exporters