diff options
author | Rahul Chaudhry <rahulchaudhry@chromium.org> | 2015-12-30 17:05:14 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-01-04 20:39:25 +0000 |
commit | cbc5a2617f8d63e3319e159eab2c407952df1df9 (patch) | |
tree | 6cf71747d12dc0c4f5f9c1d14f82848ffd14a7c4 /binary_search_tool | |
parent | 278fc7437c8a31554903161eadfac2550507a47f (diff) | |
download | toolchain-utils-cbc5a2617f8d63e3319e159eab2c407952df1df9.tar.gz |
toolchain-utils: fix missing-print-function lint warnings.
BUG=chromium:570458
TEST='crosperf/run_tests.sh' passes.
Change-Id: I2e0cf0d903b0ca7662132528ee6860ea8eaee83b
Reviewed-on: https://chrome-internal-review.googlesource.com/243412
Commit-Ready: Rahul Chaudhry <rahulchaudhry@google.com>
Tested-by: Rahul Chaudhry <rahulchaudhry@google.com>
Reviewed-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'binary_search_tool')
5 files changed, 14 insertions, 4 deletions
diff --git a/binary_search_tool/cros_pkg/cros_pkg_create_cleanup_script.py b/binary_search_tool/cros_pkg/cros_pkg_create_cleanup_script.py index 640ca658..3fc1bb61 100755 --- a/binary_search_tool/cros_pkg/cros_pkg_create_cleanup_script.py +++ b/binary_search_tool/cros_pkg/cros_pkg_create_cleanup_script.py @@ -9,12 +9,14 @@ # original state. # +from __future__ import print_function + import argparse import sys def Usage(parser, msg): - print 'ERROR: ' + msg + print('ERROR: ' + msg) parser.print_help() sys.exit(1) diff --git a/binary_search_tool/cros_pkg/cros_pkg_undo_eclean.py b/binary_search_tool/cros_pkg/cros_pkg_undo_eclean.py index cd7b2c89..ed934c47 100755 --- a/binary_search_tool/cros_pkg/cros_pkg_undo_eclean.py +++ b/binary_search_tool/cros_pkg/cros_pkg_undo_eclean.py @@ -10,6 +10,8 @@ # output file, in effect commenting out any lines that contain 'eclean'. # +from __future__ import print_function + import sys import os diff --git a/binary_search_tool/test/binary_search_tool_tester.py b/binary_search_tool/test/binary_search_tool_tester.py index 20defe2f..72816790 100755 --- a/binary_search_tool/test/binary_search_tool_tester.py +++ b/binary_search_tool/test/binary_search_tool_tester.py @@ -3,6 +3,8 @@ # Copyright 2012 Google Inc. All Rights Reserved. """Tests for bisecting tool.""" +from __future__ import print_function + __author__ = 'shenhan@google.com (Han Shen)' import os @@ -31,8 +33,8 @@ class BisectingUtilsTest(unittest.TestCase): """Cleanup temp files.""" os.remove(common.OBJECTS_FILE) os.remove(common.WORKING_SET_FILE) - print 'Deleted "{0}" and "{1}"'.format(common.OBJECTS_FILE, - common.WORKING_SET_FILE) + print('Deleted "{0}" and "{1}"'.format(common.OBJECTS_FILE, + common.WORKING_SET_FILE)) def runTest(self): args = ['--get_initial_items', './gen_init_list.py', '--switch_to_good', diff --git a/binary_search_tool/test/gen_init_list.py b/binary_search_tool/test/gen_init_list.py index c1348119..e840973c 100755 --- a/binary_search_tool/test/gen_init_list.py +++ b/binary_search_tool/test/gen_init_list.py @@ -1,6 +1,8 @@ #!/usr/bin/python2 """Prints out index for every object file, starting from 0.""" +from __future__ import print_function + import sys from utils import command_executer @@ -12,7 +14,7 @@ def Main(): _, l, _ = ce.RunCommandWOutput('cat {0} | wc -l'.format(common.OBJECTS_FILE), print_to_console=False) for i in range(0, int(l)): - print i + print(i) if __name__ == '__main__': diff --git a/binary_search_tool/test/switch_to_bad.py b/binary_search_tool/test/switch_to_bad.py index 25f76304..b8602421 100755 --- a/binary_search_tool/test/switch_to_bad.py +++ b/binary_search_tool/test/switch_to_bad.py @@ -1,6 +1,8 @@ #!/usr/bin/python2 """Switch part of the objects file in working set to (possible) bad ones.""" +from __future__ import print_function + import sys import common |