From 80fecc44761fa38ccf2e4dc6897b9f1f0c9c1ed0 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Mon, 30 May 2016 18:14:46 +0300 Subject: scripts: python3: Use print function Used print function instead of print statement to make the code work in python 3. Signed-off-by: Ed Bartosh Signed-off-by: Richard Purdie --- scripts/contrib/list-packageconfig-flags.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts/contrib/list-packageconfig-flags.py') 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): pkgname_len += 1 header = '%-*s%s' % (pkgname_len, str("RECIPE NAME"), str("PACKAGECONFIG FLAGS")) - print header - print str("").ljust(len(header), '=') + print(header) + print(str("").ljust(len(header), '=')) for pkgname in sorted(pkg_dict): print('%-*s%s' % (pkgname_len, pkgname, ' '.join(pkg_dict[pkgname]))) @@ -115,18 +115,18 @@ def display_flags(flag_dict): flag_len = len("PACKAGECONFIG FLAG") + 5 header = '%-*s%s' % (flag_len, str("PACKAGECONFIG FLAG"), str("RECIPE NAMES")) - print header - print str("").ljust(len(header), '=') + print(header) + print(str("").ljust(len(header), '=')) for flag in sorted(flag_dict): print('%-*s%s' % (flag_len, flag, ' '.join(sorted(flag_dict[flag])))) def display_all(data_dict): ''' Display all pkgs and PACKAGECONFIG information ''' - print str("").ljust(50, '=') + print(str("").ljust(50, '=')) for fn in data_dict: print('%s' % data_dict[fn].getVar("P", True)) - print fn + print(fn) packageconfig = data_dict[fn].getVar("PACKAGECONFIG", True) or '' if packageconfig.strip() == '': packageconfig = 'None' @@ -136,7 +136,7 @@ def display_all(data_dict): if flag == "doc": continue print('PACKAGECONFIG[%s] %s' % (flag, flag_val)) - print '' + print('') def main(): pkg_dict = {} -- cgit 1.2.3-korg