| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 505 'application/x-xpinstall' | 505 'application/x-xpinstall' |
| 506 ) | 506 ) |
| 507 }) | 507 }) |
| 508 | 508 |
| 509 request = self.generate_jwt_request( | 509 request = self.generate_jwt_request( |
| 510 config.get('extensions', 'amo_key'), | 510 config.get('extensions', 'amo_key'), |
| 511 config.get('extensions', 'amo_secret'), | 511 config.get('extensions', 'amo_secret'), |
| 512 upload_url, | 512 upload_url, |
| 513 'PUT', | 513 'PUT', |
| 514 data, | 514 data, |
| 515 (('Content-Type', content_type),), | 515 [('Content-Type', content_type)] |
|
Sebastian Noack
2018/03/09 16:16:27
Nit: I missed this one before. Again, comma after
tlucas
2018/03/12 07:22:46
Done.
Vasily Kuznetsov
2018/03/13 17:49:59
I actually prefer the comma after the last argumen
| |
| 516 ) | 516 ) |
| 517 | 517 |
| 518 try: | 518 try: |
| 519 urllib2.urlopen(request).close() | 519 urllib2.urlopen(request).close() |
| 520 except urllib2.HTTPError as e: | 520 except urllib2.HTTPError as e: |
| 521 try: | 521 try: |
| 522 logging.error(e.read()) | 522 logging.error(e.read()) |
| 523 finally: | 523 finally: |
| 524 e.close() | 524 e.close() |
| 525 raise | 525 raise |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 881 | 881 |
| 882 file = open(nightlyConfigFile, 'wb') | 882 file = open(nightlyConfigFile, 'wb') |
| 883 nightlyConfig.write(file) | 883 nightlyConfig.write(file) |
| 884 | 884 |
| 885 | 885 |
| 886 if __name__ == '__main__': | 886 if __name__ == '__main__': |
| 887 parser = argparse.ArgumentParser() | 887 parser = argparse.ArgumentParser() |
| 888 parser.add_argument('--download', action='store_true', default=False) | 888 parser.add_argument('--download', action='store_true', default=False) |
| 889 args = parser.parse_args() | 889 args = parser.parse_args() |
| 890 main(args.download) | 890 main(args.download) |
| LEFT | RIGHT |