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

Unified Diff: build/landmines.py

Issue 248343003: Fixing a race condition in landmines.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 70e5a4c491da871fc24d54cf9150659c7df09df2..db5e54d081dced725036fa2b707edf23313bd5f6 100755
--- a/build/landmines.py
+++ b/build/landmines.py
@@ -15,6 +15,7 @@ build is clobbered.
"""
import difflib
+import errno
import logging
import optparse
import os
@@ -57,8 +58,11 @@ def set_up_landmines(target, new_landmines):
landmine_utils.platform() == 'ios')
landmines_path = os.path.join(out_dir, '.landmines')
- if not os.path.exists(out_dir):
+ try:
os.makedirs(out_dir)
+ except OSError as e:
+ if e.errno == errno.EEXIST:
+ pass
if not os.path.exists(landmines_path):
with open(landmines_path, 'w') as f:
« 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