| OLD | NEW |
| 1 # coding: utf-8 | 1 # coding: utf-8 |
| 2 | 2 |
| 3 # This file is part of the Adblock Plus build tools, | 3 # This Source Code Form is subject to the terms of the Mozilla Public |
| 4 # Copyright (C) 2006-2014 Eyeo GmbH | 4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
| 5 # | 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 6 # Adblock Plus is free software: you can redistribute it and/or modify | |
| 7 # it under the terms of the GNU General Public License version 3 as | |
| 8 # published by the Free Software Foundation. | |
| 9 # | |
| 10 # Adblock Plus is distributed in the hope that it will be useful, | |
| 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 13 # GNU General Public License for more details. | |
| 14 # | |
| 15 # You should have received a copy of the GNU General Public License | |
| 16 # along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | |
| 17 | 6 |
| 18 # Note: These are the base functions common to all packagers, the actual | 7 # Note: These are the base functions common to all packagers, the actual |
| 19 # packagers are implemented in packagerGecko and packagerChrome. | 8 # packagers are implemented in packagerGecko and packagerChrome. |
| 20 | 9 |
| 21 import sys, os, re, codecs, subprocess, json, zipfile | 10 import sys, os, re, codecs, subprocess, json, zipfile |
| 22 from StringIO import StringIO | 11 from StringIO import StringIO |
| 23 from chainedconfigparser import ChainedConfigParser | 12 from chainedconfigparser import ChainedConfigParser |
| 24 | 13 |
| 25 import buildtools | 14 import buildtools |
| 26 | 15 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 names = self.keys() | 116 names = self.keys() |
| 128 names.sort(key=sortKey) | 117 names.sort(key=sortKey) |
| 129 for name in names: | 118 for name in names: |
| 130 zip.writestr(name, self[name]) | 119 zip.writestr(name, self[name]) |
| 131 zip.close() | 120 zip.close() |
| 132 | 121 |
| 133 def zipToString(self, sortKey=None): | 122 def zipToString(self, sortKey=None): |
| 134 buffer = StringIO() | 123 buffer = StringIO() |
| 135 self.zip(buffer, sortKey=sortKey) | 124 self.zip(buffer, sortKey=sortKey) |
| 136 return buffer.getvalue() | 125 return buffer.getvalue() |
| OLD | NEW |