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

Unified Diff: infra/bots/win_toolchain_utils.py

Issue 1813443003: Some fixes for Swarming bots (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Narrow down build products Created 4 years, 9 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 | « infra/bots/flavor/default_flavor.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/win_toolchain_utils.py
diff --git a/infra/bots/win_toolchain_utils.py b/infra/bots/win_toolchain_utils.py
index 43f62863cde3de8a457830d6339c50bc8bc47e4e..f8033e925bbdbd729199772d3adff95b38b35e05 100644
--- a/infra/bots/win_toolchain_utils.py
+++ b/infra/bots/win_toolchain_utils.py
@@ -10,6 +10,8 @@
import json
+import os
+import stat
PLACEHOLDER = '<(TOOLCHAIN_BASE_DIR)'
@@ -36,6 +38,9 @@ def _replace(val, before, after):
def _replace_in_file(filename, before, after):
"""Replace occurrences of one string with another within the file."""
+ # Make the file writeable, or the below won't work.
+ os.chmod(filename, stat.S_IWRITE)
+
with open(filename) as f:
contents = json.load(f)
new_contents = _replace(contents, before, after)
« no previous file with comments | « infra/bots/flavor/default_flavor.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698