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

Unified Diff: build/android/provision_devices.py

Issue 375603003: [Android] Ignore exceptions when provision attempts to write local props. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | « no previous file | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/provision_devices.py
diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py
index 82833de71af1a12f45518d6204274cfc43c6324d..984c026c21023a05255da07a8ecee1c1923c86ae 100755
--- a/build/android/provision_devices.py
+++ b/build/android/provision_devices.py
@@ -91,13 +91,16 @@ def _ConfigureLocalProperties(device, is_perf):
if not is_perf:
local_props.append('%s=all' % android_commands.JAVA_ASSERT_PROPERTY)
local_props.append('debug.checkjni=1')
- device.WriteFile(
- constants.DEVICE_LOCAL_PROPERTIES_PATH,
- '\n'.join(local_props), as_root=True)
- # Android will not respect the local props file if it is world writable.
- device.RunShellCommand(
- 'chmod 644 %s' % constants.DEVICE_LOCAL_PROPERTIES_PATH,
- as_root=True)
+ try:
+ device.WriteFile(
+ constants.DEVICE_LOCAL_PROPERTIES_PATH,
+ '\n'.join(local_props), as_root=True)
+ # Android will not respect the local props file if it is world writable.
+ device.RunShellCommand(
+ 'chmod 644 %s' % constants.DEVICE_LOCAL_PROPERTIES_PATH,
+ as_root=True)
+ except device_errors.CommandFailedError as e:
+ logging.warning(str(e))
# LOCAL_PROPERTIES_PATH = '/data/local.prop'
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698