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-2016 Eyeo GmbH | 2 # Copyright (C) 2006-2016 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 311 |
312 def getDownloadLinks(result): | 312 def getDownloadLinks(result): |
313 """ | 313 """ |
314 gets the download links for all extensions and puts them into the config | 314 gets the download links for all extensions and puts them into the config |
315 object | 315 object |
316 """ | 316 """ |
317 for repo in Configuration.getRepositoryConfigurations(): | 317 for repo in Configuration.getRepositoryConfigurations(): |
318 try: | 318 try: |
319 (downloadURL, version) = _getDownloadLink(repo) | 319 (downloadURL, version) = _getDownloadLink(repo) |
320 if downloadURL is None: | 320 if downloadURL is None: |
321 raise Exception('No download link found for repo: ' + repo) | 321 raise Exception('No download link found for repo: ' + |
| 322 repo.repositoryName) |
322 except: | 323 except: |
323 traceback.print_exc() | 324 traceback.print_exc() |
324 continue | 325 continue |
325 if not result.has_section(repo.repositoryName): | 326 if not result.has_section(repo.repositoryName): |
326 result.add_section(repo.repositoryName) | 327 result.add_section(repo.repositoryName) |
327 result.set(repo.repositoryName, 'downloadURL', downloadURL) | 328 result.set(repo.repositoryName, 'downloadURL', downloadURL) |
328 result.set(repo.repositoryName, 'version', version) | 329 result.set(repo.repositoryName, 'version', version) |
329 | 330 |
330 qrcode = _getQRCode(downloadURL) | 331 qrcode = _getQRCode(downloadURL) |
331 if qrcode is not None: | 332 if qrcode is not None: |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 if not extensions: | 379 if not extensions: |
379 return | 380 return |
380 | 381 |
381 updates = {} | 382 updates = {} |
382 for extension in extensions: | 383 for extension in extensions: |
383 updates[extension['basename']] = { | 384 updates[extension['basename']] = { |
384 'url': extension['updateURL'], | 385 'url': extension['updateURL'], |
385 'version': extension['version'] | 386 'version': extension['version'] |
386 } | 387 } |
387 writeLibabpUpdateManifest(path, updates) | 388 writeLibabpUpdateManifest(path, updates) |
OLD | NEW |