Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: packager.py

Issue 29345751: Issue 4028 - Add support for Edge extensions to buildtools (Closed)
Patch Set: Created June 13, 2016, 12:31 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: packager.py
===================================================================
--- a/packager.py
+++ b/packager.py
@@ -3,17 +3,16 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Note: These are the base functions common to all packagers, the actual
# packagers are implemented in packagerGecko and packagerChrome.
import sys
import os
import re
-import codecs
import subprocess
import json
import zipfile
from StringIO import StringIO
from chainedconfigparser import ChainedConfigParser
import buildtools
@@ -65,21 +64,22 @@
version += '.0'
version += '.' + buildNum
return version
def getTemplate(template, autoEscape=False):
import jinja2
- templatePath = buildtools.__path__[0]
+ templatePath = os.path.join(buildtools.__path__[0], 'templates')
Vasily Kuznetsov 2016/06/13 12:57:31 These changes are needed to move all templates int
+ loader = jinja2.FileSystemLoader(templatePath)
if autoEscape:
- env = jinja2.Environment(loader=jinja2.FileSystemLoader(templatePath), autoescape=True)
+ env = jinja2.Environment(loader=loader, autoescape=True)
else:
- env = jinja2.Environment(loader=jinja2.FileSystemLoader(templatePath))
+ env = jinja2.Environment(loader=loader)
env.filters.update({'json': json.dumps})
return env.get_template(template)
class Files(dict):
def __init__(self, includedFiles, ignoredFiles, process=None):
self.includedFiles = includedFiles
self.ignoredFiles = ignoredFiles

Powered by Google App Engine
This is Rietveld