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

Side by Side Diff: packager.py

Issue 29562599: Issue 5751 - Removing legacy gecko support (Closed)
Patch Set: Rebasing agains 5763, purging .properties code, addressing comments Created Oct. 4, 2017, 11:37 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 # This Source Code Form is subject to the terms of the Mozilla Public 1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 4
5 # Note: These are the base functions common to all packagers, the actual 5 # Note: These are the base functions common to all packagers, the actual
6 # packagers are implemented in packagerGecko and packagerChrome. 6 # packagers are implemented in packagerEdge and packagerChrome.
Sebastian Noack 2017/10/04 22:22:18 Nit: We usually list Chrome before Edge everywhere
tlucas 2017/10/05 10:10:30 Done.
7 7
8 import sys 8 import sys
9 import os 9 import os
10 import re 10 import re
11 import subprocess 11 import subprocess
12 import json 12 import json
13 import zipfile 13 import zipfile
14 from StringIO import StringIO 14 from StringIO import StringIO
15 from chainedconfigparser import ChainedConfigParser 15 from chainedconfigparser import ChainedConfigParser
16 16
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 def zip(self, outFile, sortKey=None, compression=zipfile.ZIP_DEFLATED): 136 def zip(self, outFile, sortKey=None, compression=zipfile.ZIP_DEFLATED):
137 with zipfile.ZipFile(outFile, 'w', compression) as zf: 137 with zipfile.ZipFile(outFile, 'w', compression) as zf:
138 for name in sorted(self, key=sortKey): 138 for name in sorted(self, key=sortKey):
139 zf.writestr(name, self[name]) 139 zf.writestr(name, self[name])
140 140
141 def zipToString(self, sortKey=None): 141 def zipToString(self, sortKey=None):
142 buffer = StringIO() 142 buffer = StringIO()
143 self.zip(buffer, sortKey=sortKey) 143 self.zip(buffer, sortKey=sortKey)
144 return buffer.getvalue() 144 return buffer.getvalue()
OLDNEW

Powered by Google App Engine
This is Rietveld