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

Unified Diff: build/android/gyp/apk_install.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/gyp/ant.py ('k') | build/android/gyp/create_device_library_links.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/apk_install.py
diff --git a/build/android/gyp/apk_install.py b/build/android/gyp/apk_install.py
index f6c5ab3a636c93d92d82649fe925442e13740d05..ef3032b088cf14e1607ef2a82acc4a131060c519 100755
--- a/build/android/gyp/apk_install.py
+++ b/build/android/gyp/apk_install.py
@@ -11,13 +11,12 @@
import optparse
import os
import re
+import subprocess
import sys
-# pylint: disable=F0401
from util import build_device
from util import build_utils
from util import md5_check
-# pylint: enable=F0401
BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..')
sys.path.append(BUILD_ANDROID_DIR)
@@ -28,11 +27,9 @@ from pylib.utils import apk_helper
def GetNewMetadata(device, apk_package):
"""Gets the metadata on the device for the apk_package apk."""
output = device.RunShellCommand('ls -l /data/app/')
- # pylint: disable=C0301
# Matches lines like:
# -rw-r--r-- system system 7376582 2013-04-19 16:34 org.chromium.chrome.testshell.apk
# -rw-r--r-- system system 7376582 2013-04-19 16:34 org.chromium.chrome.testshell-1.apk
- # pylint: enable=C0301
apk_matcher = lambda s: re.match('.*%s(-[0-9]*)?.apk$' % apk_package, s)
matches = filter(apk_matcher, output)
return matches[0] if matches else None
@@ -56,7 +53,7 @@ def RecordInstallMetadata(device, apk_package, metadata_path):
outfile.write(metadata)
-def main():
+def main(argv):
parser = optparse.OptionParser()
parser.add_option('--apk-path',
help='Path to .apk to install.')
@@ -104,4 +101,4 @@ def main():
if __name__ == '__main__':
- sys.exit(main())
+ sys.exit(main(sys.argv))
« no previous file with comments | « build/android/gyp/ant.py ('k') | build/android/gyp/create_device_library_links.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698