OLD | NEW |
1 # coding: utf-8 | 1 # coding: utf-8 |
2 | 2 |
3 # This file is part of the Adblock Plus web scripts, | 3 # This file is part of the Adblock Plus web scripts, |
4 # Copyright (C) 2006-2013 Eyeo GmbH | 4 # Copyright (C) 2006-2013 Eyeo GmbH |
5 # | 5 # |
6 # Adblock Plus is free software: you can redistribute it and/or modify | 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 | 7 # it under the terms of the GNU General Public License version 3 as |
8 # published by the Free Software Foundation. | 8 # published by the Free Software Foundation. |
9 # | 9 # |
10 # Adblock Plus is distributed in the hope that it will be useful, | 10 # Adblock Plus is distributed in the hope that it will be useful, |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 if self.config.has_option('extensions', self.repositoryName + '_type'): | 155 if self.config.has_option('extensions', self.repositoryName + '_type'): |
156 self.type = self.config.get('extensions', self.repositoryName + '_type') | 156 self.type = self.config.get('extensions', self.repositoryName + '_type') |
157 else: | 157 else: |
158 self.type = 'gecko' | 158 self.type = 'gecko' |
159 | 159 |
160 if self.type == 'gecko': | 160 if self.type == 'gecko': |
161 self.packageSuffix = '.xpi' | 161 self.packageSuffix = '.xpi' |
162 elif self.type == 'chrome' or self.type == 'opera': | 162 elif self.type == 'chrome' or self.type == 'opera': |
163 self.packageSuffix = '.crx' | 163 self.packageSuffix = '.crx' |
| 164 elif self.type == 'safari': |
| 165 self.packageSuffix = '.safariextz' |
164 elif self.type == 'ie': | 166 elif self.type == 'ie': |
165 self.packageSuffix = '-x64.msi' | 167 self.packageSuffix = '-x64.msi' |
166 elif self.type == 'android': | 168 elif self.type == 'android': |
167 self.packageSuffix = '.apk' | 169 self.packageSuffix = '.apk' |
168 | 170 |
169 if self.nightlyConfig and not self.nightlyConfig.has_section(self.repository
Name): | 171 if self.nightlyConfig and not self.nightlyConfig.has_section(self.repository
Name): |
170 self.nightlyConfig.add_section(self.repositoryName) | 172 self.nightlyConfig.add_section(self.repositoryName) |
171 | 173 |
172 def __str__(self): | 174 def __str__(self): |
173 """ | 175 """ |
(...skipping 10 matching lines...) Expand all Loading... |
184 in the configuration file. | 186 in the configuration file. |
185 This static method will enumerate Configuration | 187 This static method will enumerate Configuration |
186 objects representing the settings for each repository. | 188 objects representing the settings for each repository. |
187 """ | 189 """ |
188 config = get_config() | 190 config = get_config() |
189 for key, value in config.items("extensions"): | 191 for key, value in config.items("extensions"): |
190 if key.endswith("_repository"): | 192 if key.endswith("_repository"): |
191 repositoryName = re.sub(r'_repository$', '', key) | 193 repositoryName = re.sub(r'_repository$', '', key) |
192 if repositoryName: | 194 if repositoryName: |
193 yield Configuration(config, nightlyConfig, repositoryName, value) | 195 yield Configuration(config, nightlyConfig, repositoryName, value) |
OLD | NEW |