aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/lib/image/help.py2
-rwxr-xr-xscripts/wic2
2 files changed, 3 insertions, 1 deletions
diff --git a/scripts/lib/image/help.py b/scripts/lib/image/help.py
index ce42627cdb..93211498d5 100644
--- a/scripts/lib/image/help.py
+++ b/scripts/lib/image/help.py
@@ -81,11 +81,13 @@ def invoke_subcommand(args, parser, main_command_usage, subcommands):
if not args:
logging.error("No subcommand specified, exiting")
parser.print_help()
+ return 1
elif args[0] == "help":
wic_help(args, main_command_usage, subcommands)
elif args[0] not in subcommands:
logging.error("Unsupported subcommand %s, exiting\n" % (args[0]))
parser.print_help()
+ return 1
else:
usage = subcommands.get(args[0], subcommand_error)[1]
subcommands.get(args[0], subcommand_error)[0](args[1:], usage)
diff --git a/scripts/wic b/scripts/wic
index dda72a9c27..a38ecc0b8b 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -305,7 +305,7 @@ def main(argv):
parser.print_help()
sys.exit(1)
- hlp.invoke_subcommand(args, parser, hlp.wic_help_usage, subcommands)
+ return hlp.invoke_subcommand(args, parser, hlp.wic_help_usage, subcommands)
if __name__ == "__main__":