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

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

Issue 29670611: Issue 5844 - Remove redundant parentheses in sitescripts and abpsembly (Closed) Base URL: https://hg.adblockplus.org/sitescripts/
Patch Set: Fixed one more case of redundant parentheses Created Jan. 25, 2018, 7:03 p.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/crashes/web/submitCrash.py ('k') | sitescripts/formmail/web/formmail2.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # This file is part of the Adblock Plus web scripts, 1 # This file is part of the Adblock Plus web scripts,
2 # Copyright (C) 2006-present eyeo GmbH 2 # Copyright (C) 2006-present eyeo GmbH
3 # 3 #
4 # Adblock Plus is free software: you can redistribute it and/or modify 4 # Adblock Plus is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License version 3 as 5 # it under the terms of the GNU General Public License version 3 as
6 # published by the Free Software Foundation. 6 # published by the Free Software Foundation.
7 # 7 #
8 # Adblock Plus is distributed in the hope that it will be useful, 8 # Adblock Plus is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 return 'data:image/png;base64,' + base64.b64encode(data.getvalue()) 326 return 'data:image/png;base64,' + base64.b64encode(data.getvalue())
327 327
328 328
329 def getDownloadLinks(result): 329 def getDownloadLinks(result):
330 """ 330 """
331 gets the download links for all extensions and puts them into the config 331 gets the download links for all extensions and puts them into the config
332 object 332 object
333 """ 333 """
334 for repo in Configuration.getRepositoryConfigurations(): 334 for repo in Configuration.getRepositoryConfigurations():
335 try: 335 try:
336 (downloadURL, version) = _getDownloadLink(repo) 336 downloadURL, version = _getDownloadLink(repo)
337 if downloadURL is None: 337 if downloadURL is None:
338 raise Exception('No download link found for repo: ' + 338 raise Exception('No download link found for repo: ' +
339 repo.repositoryName) 339 repo.repositoryName)
340 except: 340 except:
341 traceback.print_exc() 341 traceback.print_exc()
342 continue 342 continue
343 if not result.has_section(repo.repositoryName): 343 if not result.has_section(repo.repositoryName):
344 result.add_section(repo.repositoryName) 344 result.add_section(repo.repositoryName)
345 result.set(repo.repositoryName, 'downloadURL', downloadURL) 345 result.set(repo.repositoryName, 'downloadURL', downloadURL)
346 result.set(repo.repositoryName, 'version', version) 346 result.set(repo.repositoryName, 'version', version)
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 if not extensions: 396 if not extensions:
397 return 397 return
398 398
399 updates = {} 399 updates = {}
400 for extension in extensions: 400 for extension in extensions:
401 updates[extension['basename']] = { 401 updates[extension['basename']] = {
402 'url': extension['updateURL'], 402 'url': extension['updateURL'],
403 'version': extension['version'] 403 'version': extension['version']
404 } 404 }
405 writeLibabpUpdateManifest(path, updates) 405 writeLibabpUpdateManifest(path, updates)
OLDNEW
« no previous file with comments | « sitescripts/crashes/web/submitCrash.py ('k') | sitescripts/formmail/web/formmail2.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld