summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-layers
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-12 08:30:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 08:24:02 +0100
commit0f2c59367a649de5f57acdccfb4f1fdba9cde730 (patch)
tree7a3558a3e08e690fbb0b5bdc4044316f9ab4bbcb /bitbake/bin/bitbake-layers
parentef1df516512587ad415f76a9626620992d660e45 (diff)
downloadpoky-0f2c59367a649de5f57acdccfb4f1fdba9cde730.tar.gz
bitbake: bitbake: Convert to python 3
Various misc changes to convert bitbake to python3 which don't warrant separation into separate commits. (Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin/bitbake-layers')
-rwxr-xr-xbitbake/bin/bitbake-layers5
1 files changed, 2 insertions, 3 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index d8ffa9592a..0c973dfd2f 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -1,4 +1,4 @@
1#!/usr/bin/env python 1#!/usr/bin/env python3
2 2
3# This script has subcommands which operate against your bitbake layers, either 3# This script has subcommands which operate against your bitbake layers, either
4# displaying useful information, or acting against them. 4# displaying useful information, or acting against them.
@@ -48,7 +48,6 @@ def logger_create(name, output=sys.stderr):
48 logger.setLevel(logging.INFO) 48 logger.setLevel(logging.INFO)
49 return logger 49 return logger
50 50
51
52def logger_setup_color(logger, color='auto'): 51def logger_setup_color(logger, color='auto'):
53 from bb.msg import BBLogFormatter 52 from bb.msg import BBLogFormatter
54 console = logging.StreamHandler(sys.stdout) 53 console = logging.StreamHandler(sys.stdout)
@@ -61,7 +60,6 @@ def logger_setup_color(logger, color='auto'):
61 60
62logger = logger_create('bitbake-layers', sys.stdout) 61logger = logger_create('bitbake-layers', sys.stdout)
63 62
64
65def main(): 63def main():
66 parser = argparse.ArgumentParser( 64 parser = argparse.ArgumentParser(
67 description="BitBake layers utility", 65 description="BitBake layers utility",
@@ -78,6 +76,7 @@ def main():
78 parser.add_argument('-h', '--help', action='help', default=argparse.SUPPRESS, 76 parser.add_argument('-h', '--help', action='help', default=argparse.SUPPRESS,
79 help='show this help message and exit') 77 help='show this help message and exit')
80 subparsers = parser.add_subparsers(title='subcommands', metavar='<subcommand>') 78 subparsers = parser.add_subparsers(title='subcommands', metavar='<subcommand>')
79 subparsers.required = True
81 80
82 if global_args.debug: 81 if global_args.debug:
83 logger.setLevel(logging.DEBUG) 82 logger.setLevel(logging.DEBUG)