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

Unified Diff: build/landmines.py

Issue 293983017: Always write .landmines (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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/landmines.py
diff --git a/build/landmines.py b/build/landmines.py
index db5e54d081dced725036fa2b707edf23313bd5f6..220b8a7989f45cd7a037473be6db65b70d2551b4 100755
--- a/build/landmines.py
+++ b/build/landmines.py
@@ -64,10 +64,7 @@ def set_up_landmines(target, new_landmines):
if e.errno == errno.EEXIST:
pass
- if not os.path.exists(landmines_path):
- with open(landmines_path, 'w') as f:
- f.writelines(new_landmines)
- else:
+ if os.path.exists(landmines_path):
triggered = os.path.join(out_dir, '.landmines_triggered')
with open(landmines_path, 'r') as f:
old_landmines = f.readlines()
@@ -82,6 +79,8 @@ def set_up_landmines(target, new_landmines):
elif os.path.exists(triggered):
# Remove false triggered landmines.
os.remove(triggered)
+ with open(landmines_path, 'w') as f:
+ f.writelines(new_landmines)
def process_options():
« 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