[Documentation][PATCH 1/3] scripts: standardize print usage with parentheses
Lucas Dutra Nunes <ldnunes@...>
Signed-off-by: Lucas Dutra Nunes <ldnunes@...>
--- scripts/bitbake-metadata2doc.py | 2 +- scripts/format_machine_list.py | 2 +- scripts/generate-bugs-table.py | 14 +++++++------- scripts/test-sheet-parser.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/bitbake-metadata2doc.py b/scripts/bitbake-metadata2doc.py index 095e6a9..0149dd4 100644 --- a/scripts/bitbake-metadata2doc.py +++ b/scripts/bitbake-metadata2doc.py @@ -478,7 +478,7 @@ def write_acknowledgements(out_dir, bsp_dir, gitdm_dir, start_commit, end_commit def usage(exit_code=None): - print 'Usage: %s <data file> <output dir> <bsp dir> <gitdb dir> <start commit> <end commit>' % (os.path.basename(sys.argv[0]),) + print('Usage: %s <data file> <output dir> <bsp dir> <gitdb dir> <start commit> <end commit>' % (os.path.basename(sys.argv[0]),)) if exit_code: sys.exit(exit_code) diff --git a/scripts/format_machine_list.py b/scripts/format_machine_list.py index 989a6d7..07f1437 100755 --- a/scripts/format_machine_list.py +++ b/scripts/format_machine_list.py @@ -38,7 +38,7 @@ def main(): csv_file = sys.argv[1] table = process_machines_table(read_csv_file(csv_file)) - print table.strip() + print(table.strip()) if __name__ == '__main__': diff --git a/scripts/generate-bugs-table.py b/scripts/generate-bugs-table.py index 094efde..8f82bde 100755 --- a/scripts/generate-bugs-table.py +++ b/scripts/generate-bugs-table.py @@ -44,20 +44,20 @@ def parse_data(csv_bug_list, columns_to_keep): def write_to_file(file_path, data): if(file_path == "-"): - print "\n" + data + print("\n" + data) else: - print 'Writing to file "' + file_path + '"...' + print('Writing to file "' + file_path + '"...') f = open(file_path, 'w') f.write(data) f.close() - print "Done!" + print("Done!") def generate_bugs_file(url, output_file_path, columns_to_keep): - print "Requesting bugs list in CSV format from https://bugzilla.yoctoproject.org/..." + print("Requesting bugs list in CSV format from https://bugzilla.yoctoproject.org/...") csv_bug_list = request_bug_list(url) - print "Parsing data..." + print("Parsing data...") data = parse_data(csv_bug_list, columns_to_keep) - print "Building table..." + print("Building table...") table = tabularize(data) write_to_file(output_file_path, table) @@ -120,7 +120,7 @@ def process_arguments(): "YYYY-MM-DD") exit(1) - print start_processing_message + print(start_processing_message) url = re.sub('<<START_DATE>>', start_date, url) return [url, output, columns_to_keep] diff --git a/scripts/test-sheet-parser.py b/scripts/test-sheet-parser.py index 39c84bb..71f8ba7 100755 --- a/scripts/test-sheet-parser.py +++ b/scripts/test-sheet-parser.py @@ -168,7 +168,7 @@ def process_test_sheet(test_sheet, repos_dir): print('This board was tested by %d %s.\n' % (len(testers), tester_str)) print('%d %s %s used:\n' % (len(images), image_str, was)) for image in images: - print ' * ' + image + print(' * ' + image) # Omit the first 4 questions (personal + board) and empty questions # for qno, question in enumerate(header): -- 2.1.4 |
|