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 |
Sebastian Noack
2016/07/01 15:56:03
I suppose you can remove the respective putty-igno
Vasily Kuznetsov
2016/07/01 19:51:28
It seems that there's no A301 ignore for this file
Sebastian Noack
2016/07/05 14:30:37
You are right. Importing codecs doesn't cause a A3
Vasily Kuznetsov
2016/07/07 16:23:48
Done.
|
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') |
Sebastian Noack
2016/07/01 15:56:04
While changing every line using this variable, min
Vasily Kuznetsov
2016/07/01 19:51:28
Done.
|
+ 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 |