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

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

Issue 1315743004: [Android] Add a custom pylintrc for build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix appurify_sanitized import-errors Created 5 years, 3 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/device_settings.py ('k') | build/android/pylib/gtest/gtest_test_instance.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 94ad263feccf29387a1a0c80cae1af070849b358..17a0114ee8acf8cdd88eaf4aebe59c7002249c20 100644
--- a/build/android/pylib/forwarder.py
+++ b/build/android/pylib/forwarder.py
@@ -152,7 +152,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_port = Forwarder._GetInstanceLocked(
None)._host_to_device_port_map.get(host_port)
return device_port
@@ -214,7 +214,7 @@ class Forwarder(object):
serial = str(device)
serial_with_port = (serial, device_port)
if not serial_with_port in instance._device_to_host_port_map:
- logging.error('Trying to unmap non-forwarded port %d' % device_port)
+ logging.error('Trying to unmap non-forwarded port %d', device_port)
return
redirection_command = ['--adb=' + constants.GetAdbPath(),
'--serial-id=' + serial,
@@ -223,8 +223,9 @@ class Forwarder(object):
(exit_code, output) = cmd_helper.GetCmdStatusAndOutput(
[instance._host_forwarder_path] + redirection_command)
if exit_code != 0:
- logging.error('%s exited with %d:\n%s' % (
- instance._host_forwarder_path, exit_code, '\n'.join(output)))
+ logging.error(
+ '%s exited with %d:\n%s',
+ instance._host_forwarder_path, exit_code, '\n'.join(output))
host_port = instance._device_to_host_port_map[serial_with_port]
del instance._device_to_host_port_map[serial_with_port]
del instance._host_to_device_port_map[host_port]
« no previous file with comments | « build/android/pylib/device_settings.py ('k') | build/android/pylib/gtest/gtest_test_instance.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698