crosperf: clean lint warnings.

BUG=chromium:567921
TEST=these three files are lint warning free.

Change-Id: I23f9120283fc82958abcc16f47cd29d5800bd181
Reviewed-on: https://chrome-internal-review.googlesource.com/242485
Commit-Ready: Yunlian Jiang <yunlian@google.com>
Tested-by: Yunlian Jiang <yunlian@google.com>
Reviewed-by: Caroline Tice <cmtice@google.com>
diff --git a/afe_lock_machine.py b/afe_lock_machine.py
index a676689..da518d5 100755
--- a/afe_lock_machine.py
+++ b/afe_lock_machine.py
@@ -113,6 +113,7 @@
 
     # We have to wait to do these imports until the paths above have
     # been fixed.
+    # pylint: disable=import-error
     from client import setup_modules
     setup_modules.setup(base_path=autotest_path,
                         root_module_name='autotest_lib')
diff --git a/auto_delete_nightly_test_data.py b/auto_delete_nightly_test_data.py
index ea6ea7c..e01cb08 100755
--- a/auto_delete_nightly_test_data.py
+++ b/auto_delete_nightly_test_data.py
@@ -1,5 +1,8 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 """A crontab script to delete night test data."""
+
+from __future__ import print_function
+
 __author__ = 'shenhan@google.com (Han Shen)'
 
 import datetime
@@ -24,13 +27,13 @@
   all_succeeded = True
   for cd in chromeos_dirs:
     if misc.DeleteChromeOsTree(cd, dry_run=dry_run):
-      print 'Successfully removed chromeos tree "{0}".'.format(cd)
+      print('Successfully removed chromeos tree "{0}".'.format(cd))
     else:
       all_succeeded = False
-      print 'Failed to remove chromeos tree "{0}", please check.'.format(cd)
+      print('Failed to remove chromeos tree "{0}", please check.'.format(cd))
 
   if not all_succeeded:
-    print 'Failed to delete at least one chromeos tree, please check.'
+    print('Failed to delete at least one chromeos tree, please check.')
     return False
 
   ## Now delete the numbered dir Before forcibly removing the directory, just
@@ -45,13 +48,13 @@
 
   cmd = 'rm -fr {0}'.format(s)
   if dry_run:
-    print cmd
+    print(cmd)
   else:
     if ce.RunCommand(cmd, print_to_console=False, terminated_timeout=480) == 0:
-      print 'Successfully removed "{0}".'.format(s)
+      print('Successfully removed "{0}".'.format(s))
     else:
       all_succeeded = False
-      print 'Failed to remove "{0}", please check.'.format(s)
+      print('Failed to remove "{0}", please check.'.format(s))
   return all_succeeded
 
 
@@ -120,9 +123,9 @@
          r'-exec bash -c "rm -f {{}}" \;').format(chromeos_chroot_tmp)
   rv2 = ce.RunCommand(cmd, print_to_console=False)
   if rv2 == 0:
-    print 'Successfully cleaned chromeos images.'
+    print('Successfully cleaned chromeos images.')
   else:
-    print 'Some chromeos images were not removed.'
+    print('Some chromeos images were not removed.')
 
   return rv + rv2
 
diff --git a/crosperf/benchmark_run.py b/crosperf/benchmark_run.py
index fb3d6f3..75de3d8 100644
--- a/crosperf/benchmark_run.py
+++ b/crosperf/benchmark_run.py
@@ -3,8 +3,10 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+"""Module of benchmark runs."""
+from __future__ import print_function
+
 import datetime
-import os
 import threading
 import time
 import traceback
@@ -17,7 +19,6 @@
 from results_cache import MockResultsCache
 from results_cache import Result
 from results_cache import ResultsCache
-from results_cache import TelemetryResult
 
 STATUS_FAILED = 'FAILED'
 STATUS_SUCCEEDED = 'SUCCEEDED'
@@ -28,7 +29,7 @@
 
 
 class BenchmarkRun(threading.Thread):
-
+  """The benchmarkrun class."""
   def __init__(self, name, benchmark, label, iteration, cache_conditions,
                machine_manager, logger_to_use, log_level, share_cache):
     threading.Thread.__init__(self)
@@ -50,6 +51,7 @@
     self.cache_hit = False
     self.failure_reason = ''
     self.test_args = benchmark.test_args
+    self.cache = None
     self.profiler_args = self._GetExtraAutotestArgs()
     self._ce = command_executer.GetCommandExecuter(self._logger,
                                                    log_level=self.log_level)