Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import config | |
| 6 import subprocess | |
| 7 import tempfile | |
| 8 | |
|
ppi
2015/06/24 15:14:07
The style guide wants two blank lines here I think
etiennej
2015/06/29 15:41:42
Done.
| |
| 9 def install_binary(gsutil, adb='adb'): | |
| 10 verification_call_output = subprocess.check_output( | |
| 11 [adb, 'shell', 'ls', config.REMOTE_FILE_READER_DEVICE_PATH]) | |
| 12 if config.REMOTE_FILE_READER_DEVICE_PATH != verification_call_output.strip(): | |
| 13 with tempfile.NamedTemporaryFile() as temp_file: | |
| 14 subprocess.check_call([gsutil, 'cp', config.REMOTE_FILE_READER_CLOUD_PATH, | |
| 15 temp_file.name]) | |
| 16 subprocess.check_call([adb, 'push', temp_file.name, | |
| 17 config.REMOTE_FILE_READER_DEVICE_PATH]) | |
| 18 subprocess.check_call([adb, 'shell', 'chmod', '777', | |
| 19 config.REMOTE_FILE_READER_DEVICE_PATH]) | |
| OLD | NEW |