summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/help.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic/help.py')
-rw-r--r--scripts/lib/wic/help.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py
index 63bbc23a83..47e3d1666b 100644
--- a/scripts/lib/wic/help.py
+++ b/scripts/lib/wic/help.py
@@ -30,8 +30,10 @@ import logging
30 30
31from wic.plugin import pluginmgr, PLUGIN_TYPES 31from wic.plugin import pluginmgr, PLUGIN_TYPES
32 32
33logger = logging.getLogger('wic')
34
33def subcommand_error(args): 35def subcommand_error(args):
34 logging.info("invalid subcommand %s", args[0]) 36 logger.info("invalid subcommand %s", args[0])
35 37
36 38
37def display_help(subcommand, subcommands): 39def display_help(subcommand, subcommands):
@@ -81,13 +83,13 @@ def invoke_subcommand(args, parser, main_command_usage, subcommands):
81 Should use argparse, but has to work in 2.6. 83 Should use argparse, but has to work in 2.6.
82 """ 84 """
83 if not args: 85 if not args:
84 logging.error("No subcommand specified, exiting") 86 logger.error("No subcommand specified, exiting")
85 parser.print_help() 87 parser.print_help()
86 return 1 88 return 1
87 elif args[0] == "help": 89 elif args[0] == "help":
88 wic_help(args, main_command_usage, subcommands) 90 wic_help(args, main_command_usage, subcommands)
89 elif args[0] not in subcommands: 91 elif args[0] not in subcommands:
90 logging.error("Unsupported subcommand %s, exiting\n", args[0]) 92 logger.error("Unsupported subcommand %s, exiting\n", args[0])
91 parser.print_help() 93 parser.print_help()
92 return 1 94 return 1
93 else: 95 else: