Index: build/android/gyp/apk_install.py |
diff --git a/build/android/gyp/apk_install.py b/build/android/gyp/apk_install.py |
index ef3032b088cf14e1607ef2a82acc4a131060c519..53aeced5c457cccaeaa834a201592f8c18a7cc7c 100755 |
--- a/build/android/gyp/apk_install.py |
+++ b/build/android/gyp/apk_install.py |
@@ -11,7 +11,6 @@ |
import optparse |
import os |
import re |
-import subprocess |
import sys |
from util import build_device |
@@ -27,9 +26,11 @@ 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 |
@@ -53,7 +54,7 @@ def RecordInstallMetadata(device, apk_package, metadata_path): |
outfile.write(metadata) |
-def main(argv): |
+def main(): |
parser = optparse.OptionParser() |
parser.add_option('--apk-path', |
help='Path to .apk to install.') |
@@ -101,4 +102,4 @@ def main(argv): |
if __name__ == '__main__': |
- sys.exit(main(sys.argv)) |
+ sys.exit(main()) |