diff options
author | Rahul Chaudhry <rahulchaudhry@chromium.org> | 2016-07-29 14:36:33 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-07-29 17:28:55 -0700 |
commit | 685ed888ddb849232644b20a2d9cb72be403aac3 (patch) | |
tree | fb8fc0c9a74e44663c472589c2a177493bfd940b | |
parent | 90c7d37553ae22cfce56bc7423fc9735f271fc6f (diff) | |
download | toolchain-utils-685ed888ddb849232644b20a2d9cb72be403aac3.tar.gz |
toolchain-utils: fix missing-print-function lint warnings.
BUG=chromium:632109
TEST='./run_tests.py passes'
Change-Id: Ie6881fb543cc145c9c09dd83f6b8a70c2f3083bd
Reviewed-on: https://chrome-internal-review.googlesource.com/272171
Commit-Ready: Rahul Chaudhry <rahulchaudhry@google.com>
Tested-by: Rahul Chaudhry <rahulchaudhry@google.com>
Reviewed-by: Caroline Tice <cmtice@google.com>
-rwxr-xr-x | crosperf/download_images_buildid_test.py | 18 | ||||
-rw-r--r-- | crosperf/image_checksummer.py | 2 | ||||
-rw-r--r-- | crosperf/mock_instance.py | 2 |
3 files changed, 14 insertions, 8 deletions
diff --git a/crosperf/download_images_buildid_test.py b/crosperf/download_images_buildid_test.py index 65b08273..6069e9ba 100755 --- a/crosperf/download_images_buildid_test.py +++ b/crosperf/download_images_buildid_test.py @@ -2,6 +2,8 @@ # # Copyright 2014 Google Inc. All Rights Reserved +from __future__ import print_function + import optparse import sys @@ -34,19 +36,19 @@ class ImageDownloaderBuildIDTest(object): self.tests_failed = 0 def _usage(self, parser, message): - print 'ERROR: ' + message + print('ERROR: ' + message) parser.print_help() sys.exit(0) def print_test_status(self): - print '----------------------------------------\n' - print 'Tests attempted: %d' % self.tests_run - print 'Tests passed: %d' % self.tests_passed - print 'Tests failed: %d' % self.tests_failed - print '\n----------------------------------------' + print('----------------------------------------\n') + print('Tests attempted: %d' % self.tests_run) + print('Tests passed: %d' % self.tests_passed) + print('Tests failed: %d' % self.tests_failed) + print('\n----------------------------------------') def assert_failure(self, msg): - print 'Assert failure: %s' % msg + print('Assert failure: %s' % msg) self.print_test_status() sys.exit(1) @@ -66,7 +68,7 @@ class ImageDownloaderBuildIDTest(object): self.assert_failure('%s is not Equal to %s' % (arg1_name, arg2_name)) def test_one_id(self, downloader, test_id, result_string, exact_match): - print "Translating '%s'" % test_id + print("Translating '%s'" % test_id) self.tests_run = self.tests_run + 1 result = downloader.GetBuildID(self.chromeos_root, test_id) diff --git a/crosperf/image_checksummer.py b/crosperf/image_checksummer.py index 552f379e..2afd8d5d 100644 --- a/crosperf/image_checksummer.py +++ b/crosperf/image_checksummer.py @@ -1,5 +1,7 @@ # Copyright 2011 Google Inc. All Rights Reserved. +from __future__ import print_function + import os import threading diff --git a/crosperf/mock_instance.py b/crosperf/mock_instance.py index c2a0b1f3..631efe86 100644 --- a/crosperf/mock_instance.py +++ b/crosperf/mock_instance.py @@ -3,6 +3,8 @@ # found in the LICENSE file. """This contains some mock instances for testing.""" +from __future__ import print_function + from benchmark import Benchmark from benchmark_run import MockBenchmarkRun from label import MockLabel |