summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/wic5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/wic b/scripts/wic
index a3c0f731d9..017ef99dda 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -501,6 +501,9 @@ subcommands = {
501def init_parser(parser): 501def init_parser(parser):
502 parser.add_argument("--version", action="version", 502 parser.add_argument("--version", action="version",
503 version="%(prog)s {version}".format(version=__version__)) 503 version="%(prog)s {version}".format(version=__version__))
504 parser.add_argument("-D", "--debug", dest="debug", action="store_true",
505 default=False, help="output debug information")
506
504 subparsers = parser.add_subparsers(dest='command', help=hlp.wic_usage) 507 subparsers = parser.add_subparsers(dest='command', help=hlp.wic_usage)
505 for subcmd in subcommands: 508 for subcmd in subcommands:
506 subparser = subparsers.add_parser(subcmd, help=subcommands[subcmd][2]) 509 subparser = subparsers.add_parser(subcmd, help=subcommands[subcmd][2])
@@ -514,6 +517,8 @@ def main(argv):
514 init_parser(parser) 517 init_parser(parser)
515 518
516 args = parser.parse_args(argv) 519 args = parser.parse_args(argv)
520 if args.debug:
521 logger.setLevel(logging.DEBUG)
517 522
518 if "command" in vars(args): 523 if "command" in vars(args):
519 if args.command == "help": 524 if args.command == "help":