diff options
| author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-05-30 18:14:46 +0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-01 12:47:10 +0100 |
| commit | 2e388048b61f6029bae1913cbb546ac40b9cfe51 (patch) | |
| tree | 8fa0fc951caab1430636fca971c27a7e7beb45ce /scripts/contrib/list-packageconfig-flags.py | |
| parent | 79be110c1fdfd0affe6a310b96e7107c4549d23c (diff) | |
| download | poky-2e388048b61f6029bae1913cbb546ac40b9cfe51.tar.gz | |
scripts: python3: Use print function
Used print function instead of print statement to make
the code work in python 3.
(From OE-Core rev: 80fecc44761fa38ccf2e4dc6897b9f1f0c9c1ed0)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/list-packageconfig-flags.py')
| -rwxr-xr-x | scripts/contrib/list-packageconfig-flags.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/contrib/list-packageconfig-flags.py b/scripts/contrib/list-packageconfig-flags.py index 2f3b8b06a6..5dfe796c0a 100755 --- a/scripts/contrib/list-packageconfig-flags.py +++ b/scripts/contrib/list-packageconfig-flags.py | |||
| @@ -104,8 +104,8 @@ def display_pkgs(pkg_dict): | |||
| 104 | pkgname_len += 1 | 104 | pkgname_len += 1 |
| 105 | 105 | ||
| 106 | header = '%-*s%s' % (pkgname_len, str("RECIPE NAME"), str("PACKAGECONFIG FLAGS")) | 106 | header = '%-*s%s' % (pkgname_len, str("RECIPE NAME"), str("PACKAGECONFIG FLAGS")) |
| 107 | print header | 107 | print(header) |
| 108 | print str("").ljust(len(header), '=') | 108 | print(str("").ljust(len(header), '=')) |
| 109 | for pkgname in sorted(pkg_dict): | 109 | for pkgname in sorted(pkg_dict): |
| 110 | print('%-*s%s' % (pkgname_len, pkgname, ' '.join(pkg_dict[pkgname]))) | 110 | print('%-*s%s' % (pkgname_len, pkgname, ' '.join(pkg_dict[pkgname]))) |
| 111 | 111 | ||
| @@ -115,18 +115,18 @@ def display_flags(flag_dict): | |||
| 115 | flag_len = len("PACKAGECONFIG FLAG") + 5 | 115 | flag_len = len("PACKAGECONFIG FLAG") + 5 |
| 116 | 116 | ||
| 117 | header = '%-*s%s' % (flag_len, str("PACKAGECONFIG FLAG"), str("RECIPE NAMES")) | 117 | header = '%-*s%s' % (flag_len, str("PACKAGECONFIG FLAG"), str("RECIPE NAMES")) |
| 118 | print header | 118 | print(header) |
| 119 | print str("").ljust(len(header), '=') | 119 | print(str("").ljust(len(header), '=')) |
| 120 | 120 | ||
| 121 | for flag in sorted(flag_dict): | 121 | for flag in sorted(flag_dict): |
| 122 | print('%-*s%s' % (flag_len, flag, ' '.join(sorted(flag_dict[flag])))) | 122 | print('%-*s%s' % (flag_len, flag, ' '.join(sorted(flag_dict[flag])))) |
| 123 | 123 | ||
| 124 | def display_all(data_dict): | 124 | def display_all(data_dict): |
| 125 | ''' Display all pkgs and PACKAGECONFIG information ''' | 125 | ''' Display all pkgs and PACKAGECONFIG information ''' |
| 126 | print str("").ljust(50, '=') | 126 | print(str("").ljust(50, '=')) |
| 127 | for fn in data_dict: | 127 | for fn in data_dict: |
| 128 | print('%s' % data_dict[fn].getVar("P", True)) | 128 | print('%s' % data_dict[fn].getVar("P", True)) |
| 129 | print fn | 129 | print(fn) |
| 130 | packageconfig = data_dict[fn].getVar("PACKAGECONFIG", True) or '' | 130 | packageconfig = data_dict[fn].getVar("PACKAGECONFIG", True) or '' |
| 131 | if packageconfig.strip() == '': | 131 | if packageconfig.strip() == '': |
| 132 | packageconfig = 'None' | 132 | packageconfig = 'None' |
| @@ -136,7 +136,7 @@ def display_all(data_dict): | |||
| 136 | if flag == "doc": | 136 | if flag == "doc": |
| 137 | continue | 137 | continue |
| 138 | print('PACKAGECONFIG[%s] %s' % (flag, flag_val)) | 138 | print('PACKAGECONFIG[%s] %s' % (flag, flag_val)) |
| 139 | print '' | 139 | print('') |
| 140 | 140 | ||
| 141 | def main(): | 141 | def main(): |
| 142 | pkg_dict = {} | 142 | pkg_dict = {} |
