| OLD | NEW |
| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 return 'data:image/png;base64,' + base64.b64encode(data.getvalue()) | 325 return 'data:image/png;base64,' + base64.b64encode(data.getvalue()) |
| 326 | 326 |
| 327 | 327 |
| 328 def getDownloadLinks(result): | 328 def getDownloadLinks(result): |
| 329 """ | 329 """ |
| 330 gets the download links for all extensions and puts them into the config | 330 gets the download links for all extensions and puts them into the config |
| 331 object | 331 object |
| 332 """ | 332 """ |
| 333 for repo in Configuration.getRepositoryConfigurations(): | 333 for repo in Configuration.getRepositoryConfigurations(): |
| 334 try: | 334 try: |
| 335 (downloadURL, version) = _getDownloadLink(repo) | 335 downloadURL, version = _getDownloadLink(repo) |
| 336 if downloadURL is None: | 336 if downloadURL is None: |
| 337 raise Exception('No download link found for repo: ' + | 337 raise Exception('No download link found for repo: ' + |
| 338 repo.repositoryName) | 338 repo.repositoryName) |
| 339 except: | 339 except: |
| 340 traceback.print_exc() | 340 traceback.print_exc() |
| 341 continue | 341 continue |
| 342 if not result.has_section(repo.repositoryName): | 342 if not result.has_section(repo.repositoryName): |
| 343 result.add_section(repo.repositoryName) | 343 result.add_section(repo.repositoryName) |
| 344 result.set(repo.repositoryName, 'downloadURL', downloadURL) | 344 result.set(repo.repositoryName, 'downloadURL', downloadURL) |
| 345 result.set(repo.repositoryName, 'version', version) | 345 result.set(repo.repositoryName, 'version', version) |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 if not extensions: | 395 if not extensions: |
| 396 return | 396 return |
| 397 | 397 |
| 398 updates = {} | 398 updates = {} |
| 399 for extension in extensions: | 399 for extension in extensions: |
| 400 updates[extension['basename']] = { | 400 updates[extension['basename']] = { |
| 401 'url': extension['updateURL'], | 401 'url': extension['updateURL'], |
| 402 'version': extension['version'] | 402 'version': extension['version'] |
| 403 } | 403 } |
| 404 writeLibabpUpdateManifest(path, updates) | 404 writeLibabpUpdateManifest(path, updates) |
| OLD | NEW |