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

Unified Diff: core/scripts/template_expander.py

Issue 37053003: Roll IDL to multivm@1467 (Closed) Base URL: https://dart.googlecode.com/svn/third_party/WebCore
Patch Set: Created 7 years, 2 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 | « core/scripts/name_utilities.py ('k') | core/scripts/templates/InternalRuntimeFlags.idl.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/scripts/template_expander.py
diff --git a/core/scripts/template_expander.py b/core/scripts/template_expander.py
index aafeb6840e66dc861d05b7cd3c7901c2884296ff..b1e99b671fddd8e9a82dcd9cd3118c5ed9811164 100644
--- a/core/scripts/template_expander.py
+++ b/core/scripts/template_expander.py
@@ -31,14 +31,15 @@ import sys
_current_dir = os.path.dirname(os.path.realpath(__file__))
# jinja2 is in chromium's third_party directory
-sys.path.append(os.path.join(_current_dir, *([os.pardir] * 4)))
+# Insert at front to override system libraries, and after path[0] == script dir
+sys.path.insert(1, os.path.join(_current_dir, *([os.pardir] * 4)))
import jinja2
def apply_template(path_to_template, params):
dirname, basename = os.path.split(path_to_template)
path_to_templates = os.path.join(_current_dir, "templates")
- jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader([dirname, path_to_templates]))
+ jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader([dirname, path_to_templates]), keep_trailing_newline=True)
template = jinja_env.get_template(basename)
return template.render(params)
« no previous file with comments | « core/scripts/name_utilities.py ('k') | core/scripts/templates/InternalRuntimeFlags.idl.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698