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

Unified Diff: tools/cr/cr/actions/gn.py

Issue 1168053003: cr: Ensure build directory exists before writing gn args (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments. Created 5 years, 6 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: tools/cr/cr/actions/gn.py
diff --git a/tools/cr/cr/actions/gn.py b/tools/cr/cr/actions/gn.py
index a79aa81fc24d2a6aded7fe8ab7577363d2909b7d..fcd40c766aa72c21ccc4e19b73962b32a053a7a2 100644
--- a/tools/cr/cr/actions/gn.py
+++ b/tools/cr/cr/actions/gn.py
@@ -78,6 +78,11 @@ class GnPrepareOut(cr.PrepareOut):
for key, value in args.items():
arg_lines.append('%s = %s' % (key, value))
+ try:
+ os.makedirs(out_path)
+ except OSError:
+ if not os.path.isdir(out_path):
+ raise
with open(args_file, 'w') as f:
f.write('\n'.join(arg_lines) + '\n')
« 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