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

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

Issue 1389223003: [Android] Silence flag_changer on missing command-line file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/flag_changer.py
diff --git a/build/android/pylib/flag_changer.py b/build/android/pylib/flag_changer.py
index ccc3c09815cfeabf1b7905272218f2902b5fb8e0..a98a0cd2df5419c956800866e157fcf036396165 100644
--- a/build/android/pylib/flag_changer.py
+++ b/build/android/pylib/flag_changer.py
@@ -28,10 +28,12 @@ class FlagChanger(object):
self._cmdline_file = cmdline_file
# Save the original flags.
- try:
- self._orig_line = self._device.ReadFile(self._cmdline_file).strip()
- except device_errors.CommandFailedError:
- self._orig_line = ''
+ self._orig_line = ''
+ if self._device.PathExists(self._cmdline_file):
+ try:
+ self._orig_line = self._device.ReadFile(self._cmdline_file).strip()
+ except device_errors.CommandFailedError:
+ pass
# Parse out the flags into a list to facilitate adding and removing flags.
self._current_flags = self._TokenizeFlags(self._orig_line)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698