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

Unified Diff: appengine/components/components/utils.py

Issue 1481573002: Update jinja2 to master (between 2.8 and 2.8.1); fix urlencode bug. (Closed) Base URL: git@github.com:luci/luci-py.git@1_tools
Patch Set: Add import hack Created 5 years 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: appengine/components/components/utils.py
diff --git a/appengine/components/components/utils.py b/appengine/components/components/utils.py
index 44cf84539b39d85ece0551f84907a9dab7d43598..4bc6d6fdc6293d31680b0bdc68c3fbdf941d95be 100644
--- a/appengine/components/components/utils.py
+++ b/appengine/components/components/utils.py
@@ -598,3 +598,11 @@ def fix_protobuf_package():
protobuf_pkg = os.path.join(THIS_DIR, 'third_party', 'protobuf', 'google')
if protobuf_pkg not in google.__path__:
google.__path__.append(protobuf_pkg)
+
+
+def import_jinja2():
+ """Remove any existing jinja2 package and add ours."""
+ for i in sys.path[:]:
+ if os.path.basename(i) == 'jinja2':
+ sys.path.remove(i)
+ sys.path.append(os.path.join(THIS_DIR, 'third_party'))

Powered by Google App Engine
This is Rietveld 408576698