Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1098)

Unified Diff: build/android/pylib/forwarder.py

Issue 153743008: Revert of Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merging with changes to pylib/linker/test_case.py. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/flag_changer.py ('k') | build/android/pylib/gtest/setup.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/forwarder.py
diff --git a/build/android/pylib/forwarder.py b/build/android/pylib/forwarder.py
index b59ae9aff32942b4d85c4711ce5832844641991e..ba81d9c7c3ccc9f2cb0a446e3dfaf6e2a5ef9051 100644
--- a/build/android/pylib/forwarder.py
+++ b/build/android/pylib/forwarder.py
@@ -2,15 +2,18 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# pylint: disable=W0212
-
import fcntl
import logging
import os
import psutil
+import re
+import sys
+import time
+
+import android_commands
+import cmd_helper
+import constants
-from pylib import cmd_helper
-from pylib import constants
from pylib import valgrind_tools
@@ -25,7 +28,6 @@ class _FileLock(object):
multiprocessing Python module is used.
"""
def __init__(self, path):
- self._fd = -1
self._path = path
def __enter__(self):
@@ -34,7 +36,7 @@ class _FileLock(object):
raise Exception('Could not open file %s for reading' % self._path)
fcntl.flock(self._fd, fcntl.LOCK_EX)
- def __exit__(self, _exception_type, _exception_value, traceback):
+ def __exit__(self, type, value, traceback):
fcntl.flock(self._fd, fcntl.LOCK_UN)
os.close(self._fd)
@@ -152,7 +154,7 @@ class Forwarder(object):
def DevicePortForHostPort(host_port):
"""Returns the device port that corresponds to a given host port."""
with _FileLock(Forwarder._LOCK_PATH):
- (_device_serial, device_port) = Forwarder._GetInstanceLocked(
+ (device_serial, device_port) = Forwarder._GetInstanceLocked(
None)._host_to_device_port_map.get(host_port)
return device_port
@@ -317,7 +319,7 @@ class Forwarder(object):
logging.info('Killing device_forwarder.')
if not adb.FileExistsOnDevice(Forwarder._DEVICE_FORWARDER_PATH):
return
- adb.GetShellCommandStatusAndOutput(
+ (exit_code, output) = adb.GetShellCommandStatusAndOutput(
'%s %s --kill-server' % (tool.GetUtilWrapper(),
Forwarder._DEVICE_FORWARDER_PATH))
# TODO(pliard): Remove the following call to KillAllBlocking() when we are
« no previous file with comments | « build/android/pylib/flag_changer.py ('k') | build/android/pylib/gtest/setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698