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

Unified Diff: Source/core/scripts/in_generator.py

Issue 15095002: Use jinja2 for make_runtime_features and make_internal_runtime_flags (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 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
Index: Source/core/scripts/in_generator.py
diff --git a/Source/core/scripts/in_generator.py b/Source/core/scripts/in_generator.py
index dad625ee354cab4a1ba1b969a087ab4175f0e357..1214f05b416ca58ea042bedb7ed4727aa258bcd4 100644
--- a/Source/core/scripts/in_generator.py
+++ b/Source/core/scripts/in_generator.py
@@ -30,6 +30,7 @@ import os.path
import shutil
from in_file import InFile
+import template_expander
class Writer(object):
@@ -84,6 +85,8 @@ class Writer(object):
def _write_file(self, output_dir, generator, file_name):
contents = generator()
+ if type(contents) is dict:
+ contents = template_expander.applytemplate(file_name + ".tmpl", contents)
if not contents:
return
path = os.path.join(output_dir, file_name)

Powered by Google App Engine
This is Rietveld 408576698