[Pkg-mozext-commits] [adblock-plus] 400/464: Only import Jinja2 when actually used, drop unused Jinja2 extension

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:37 UTC 2014

This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 5c985b8587cfc457cc831b6c95dc3a81dd0100e3
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Thu Aug 29 23:04:25 2013 +0200

    Only import Jinja2 when actually used, drop unused Jinja2 extension
    extra : rebase_source : d0cb9ddbfd1246280be805ef3eba3d8d6fa95dff
 packager.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/packager.py b/packager.py
index 7006dfa..4fc1d08 100644
--- a/packager.py
+++ b/packager.py
@@ -18,7 +18,7 @@
 # Note: These are the base functions common to all packagers, the actual
 # packagers are implemented in packagerGecko and packagerChrome.
-import sys, os, re, codecs, subprocess, json, zipfile, jinja2
+import sys, os, re, codecs, subprocess, json, zipfile
 from StringIO import StringIO
 from chainedconfigparser import ChainedConfigParser
@@ -56,9 +56,11 @@ def getBuildVersion(baseDir, metadata, releaseBuild, buildNum=None):
   return version
 def getTemplate(template, autoEscape=False):
+  import jinja2
   templatePath = buildtools.__path__[0]
   if autoEscape:
-    env = jinja2.Environment(loader=jinja2.FileSystemLoader(templatePath), autoescape=True, extensions=['jinja2.ext.autoescape'])
+    env = jinja2.Environment(loader=jinja2.FileSystemLoader(templatePath), autoescape=True)
     env = jinja2.Environment(loader=jinja2.FileSystemLoader(templatePath))
   env.filters.update({'json': json.dumps})

Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git

More information about the Pkg-mozext-commits mailing list