[oe-commits] [openembedded-core] 05/09: wic: add global debug option

git at git.openembedded.org git at git.openembedded.org
Sat May 4 09:46:36 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 4e23b22bdf7b0e1fd16c7e53b6a7232c9c92ce95
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Tue Apr 30 14:57:31 2019 +0100

    wic: add global debug option
    
    Add a global --debug option to assist debugging.
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/wic | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/wic b/scripts/wic
index a3c0f73..017ef99 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -501,6 +501,9 @@ subcommands = {
 def init_parser(parser):
     parser.add_argument("--version", action="version",
         version="%(prog)s {version}".format(version=__version__))
+    parser.add_argument("-D", "--debug", dest="debug", action="store_true",
+        default=False, help="output debug information")
+
     subparsers = parser.add_subparsers(dest='command', help=hlp.wic_usage)
     for subcmd in subcommands:
         subparser = subparsers.add_parser(subcmd, help=subcommands[subcmd][2])
@@ -514,6 +517,8 @@ def main(argv):
     init_parser(parser)
 
     args = parser.parse_args(argv)
+    if args.debug:
+        logger.setLevel(logging.DEBUG)
 
     if "command" in vars(args):
         if args.command == "help":

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list