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

Unified Diff: pylib/gyp/generator/scons.py

Issue 10535052: Make Ninja backend robust to rules and actions containing slashes (Closed) Base URL: http://git.chromium.org/external/gyp.git@master
Patch Set: Created 8 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 | « pylib/gyp/generator/ninja.py ('k') | pylib/gyp/generator/xcode.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/scons.py
===================================================================
--- pylib/gyp/generator/scons.py (revision 1410)
+++ pylib/gyp/generator/scons.py (working copy)
@@ -8,7 +8,6 @@
import os.path
import pprint
import re
-import string
# TODO: remove when we delete the last WriteList() call in this module
@@ -463,7 +462,7 @@
rules = spec.get('rules', [])
for rule in rules:
- name = rule['rule_name'].translate(string.maketrans(' ()-', '____'))
+ name = re.sub('[^a-zA-Z0-9_]', '_', rule['rule_name'])
message = rule.get('message')
if message:
message = repr(message)
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | pylib/gyp/generator/xcode.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698