Left: | ||
Right: |
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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
316 object | 316 object |
317 """ | 317 """ |
318 for repo in Configuration.getRepositoryConfigurations(): | 318 for repo in Configuration.getRepositoryConfigurations(): |
319 try: | 319 try: |
320 (downloadURL, version) = _getDownloadLink(repo) | 320 (downloadURL, version) = _getDownloadLink(repo) |
321 if downloadURL is None: | 321 if downloadURL is None: |
322 raise Exception('No download link found for repo: ' + | 322 raise Exception('No download link found for repo: ' + |
323 repo.repositoryName) | 323 repo.repositoryName) |
324 except ExpatError: | 324 except ExpatError: |
325 traceback.print_exc() | 325 traceback.print_exc() |
326 print "Error found while parsing xml from %s link" % repo.repository Name | 326 print 'Error found while parsing xml from {0} link'\ |
Vasily Kuznetsov
2017/01/09 21:59:54
Breaking lines with a backslash (`\`) is generally
Vasily Kuznetsov
2017/01/09 22:01:12
Sorry, I meant that this print statement will prin
| |
327 .format(repo.repositoryName) | |
327 continue | 328 continue |
328 except: | 329 except: |
329 traceback.print_exc() | 330 traceback.print_exc() |
330 continue | 331 continue |
331 if not result.has_section(repo.repositoryName): | 332 if not result.has_section(repo.repositoryName): |
332 result.add_section(repo.repositoryName) | 333 result.add_section(repo.repositoryName) |
333 result.set(repo.repositoryName, 'downloadURL', downloadURL) | 334 result.set(repo.repositoryName, 'downloadURL', downloadURL) |
334 result.set(repo.repositoryName, 'version', version) | 335 result.set(repo.repositoryName, 'version', version) |
335 | 336 |
336 qrcode = _getQRCode(downloadURL) | 337 qrcode = _getQRCode(downloadURL) |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
384 if not extensions: | 385 if not extensions: |
385 return | 386 return |
386 | 387 |
387 updates = {} | 388 updates = {} |
388 for extension in extensions: | 389 for extension in extensions: |
389 updates[extension['basename']] = { | 390 updates[extension['basename']] = { |
390 'url': extension['updateURL'], | 391 'url': extension['updateURL'], |
391 'version': extension['version'] | 392 'version': extension['version'] |
392 } | 393 } |
393 writeLibabpUpdateManifest(path, updates) | 394 writeLibabpUpdateManifest(path, updates) |
OLD | NEW |