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

Side by Side Diff: sitescripts/extensions/utils.py

Issue 8851004: Added Opera extension type (Closed)
Patch Set: Created Nov. 13, 2012, 9:46 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
« no previous file with comments | « sitescripts/extensions/bin/updateDownloadLinks.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-2012 Eyeo GmbH 4 # Copyright (C) 2006-2012 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
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': 162 elif self.type == 'chrome':
163 self.packageSuffix = '.crx' 163 self.packageSuffix = '.crx'
164 elif self.type == 'opera':
165 self.packageSuffix = '.oex'
164 elif self.type == 'kmeleon': 166 elif self.type == 'kmeleon':
165 self.packageSuffix = '.zip' 167 self.packageSuffix = '.zip'
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
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)
OLDNEW
« no previous file with comments | « sitescripts/extensions/bin/updateDownloadLinks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld