aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcrosperf/crosperf.py4
-rw-r--r--crosperf/suite_runner.py1
-rwxr-xr-xutils/buildbot_json.py7
-rw-r--r--utils/misc.py6
4 files changed, 16 insertions, 2 deletions
diff --git a/crosperf/crosperf.py b/crosperf/crosperf.py
index 6b00cf7f..e874277b 100755
--- a/crosperf/crosperf.py
+++ b/crosperf/crosperf.py
@@ -15,6 +15,10 @@ from experiment_runner import MockExperimentRunner
from experiment_factory import ExperimentFactory
from experiment_file import ExperimentFile
from settings_factory import GlobalSettings
+
+# This import causes pylint to warn about "No name 'logger' in module 'utils'".
+# I do not understand why. The import works fine in python.
+# pylint: disable=no-name-in-module
from utils import logger
import test_flag
diff --git a/crosperf/suite_runner.py b/crosperf/suite_runner.py
index b7b26bf2..b0b4c3ac 100644
--- a/crosperf/suite_runner.py
+++ b/crosperf/suite_runner.py
@@ -1,4 +1,3 @@
-
# Copyright (c) 2013~2015 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/utils/buildbot_json.py b/utils/buildbot_json.py
index 3800b900..693a42cd 100755
--- a/utils/buildbot_json.py
+++ b/utils/buildbot_json.py
@@ -40,8 +40,15 @@ import code
import datetime
import functools
import json
+
+# Pylint recommends we use "from chromite.lib import cros_logging as logging".
+# Chromite specific policy message, we want to keep using the standard logging.
+# pylint: disable=cros-logging-import
import logging
+
+# pylint: disable=deprecated-module
import optparse
+
import time
import urllib
import urllib2
diff --git a/utils/misc.py b/utils/misc.py
index 1ffd235b..ae234fe3 100644
--- a/utils/misc.py
+++ b/utils/misc.py
@@ -470,6 +470,9 @@ def ApplyGerritPatches(chromeos_root,
### First of all, we need chromite libs
sys.path.append(os.path.join(chromeos_root, 'chromite'))
+ # Imports below are ok after modifying path to add chromite.
+ # Pylint cannot detect that and complains.
+ # pylint: disable=import-error
from lib import git
from lib import gerrit
manifest = git.ManifestCheckout(chromeos_root)
@@ -541,7 +544,8 @@ def BooleanPrompt(prompt='Do you want to continue?',
except KeyboardInterrupt:
# If the user hits CTRL+C, just exit the process.
print()
- Die('CTRL+C detected; exiting')
+ print('CTRL+C detected; exiting')
+ sys.exit()
if not response:
return default