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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/generate/template_expander.py

Issue 250953003: Prefer third_party version of jinja2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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: mojo/public/tools/bindings/pylib/mojom/generate/template_expander.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/template_expander.py b/mojo/public/tools/bindings/pylib/mojom/generate/template_expander.py
index 0e7332b96b3d5fea07d4d25f797ff30146690f2c..e0a7485d8bba59e4092be655a3edcd3a76e60f92 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/template_expander.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/template_expander.py
@@ -23,10 +23,7 @@ def _GetDirAbove(dirname):
if tail == dirname:
return path
-try:
- imp.find_module("jinja2")
-except ImportError:
- sys.path.append(os.path.join(_GetDirAbove("mojo"), "third_party"))
+sys.path.insert(0, os.path.join(_GetDirAbove("mojo"), "third_party"))
import jinja2
« 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