OLD | NEW |
1 # coding: utf-8 | |
2 | |
3 # 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 |
4 # 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 |
5 # 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/. |
6 | 4 |
7 # 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 |
8 # packagers are implemented in packagerGecko and packagerChrome. | 6 # packagers are implemented in packagerGecko and packagerChrome. |
9 | 7 |
10 import sys | 8 import sys |
11 import os | 9 import os |
12 import re | 10 import re |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 names = self.keys() | 140 names = self.keys() |
143 names.sort(key=sortKey) | 141 names.sort(key=sortKey) |
144 for name in names: | 142 for name in names: |
145 zip.writestr(name, self[name]) | 143 zip.writestr(name, self[name]) |
146 zip.close() | 144 zip.close() |
147 | 145 |
148 def zipToString(self, sortKey=None): | 146 def zipToString(self, sortKey=None): |
149 buffer = StringIO() | 147 buffer = StringIO() |
150 self.zip(buffer, sortKey=sortKey) | 148 self.zip(buffer, sortKey=sortKey) |
151 return buffer.getvalue() | 149 return buffer.getvalue() |
OLD | NEW |