OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # coding: utf-8 | 2 # coding: utf-8 |
3 # | 3 # |
4 # Copyright 2007 Google Inc. | 4 # Copyright 2007 Google Inc. |
5 # | 5 # |
6 # Licensed under the Apache License, Version 2.0 (the "License"); | 6 # Licensed under the Apache License, Version 2.0 (the "License"); |
7 # you may not use this file except in compliance with the License. | 7 # you may not use this file except in compliance with the License. |
8 # You may obtain a copy of the License at | 8 # You may obtain a copy of the License at |
9 # | 9 # |
10 # http://www.apache.org/licenses/LICENSE-2.0 | 10 # http://www.apache.org/licenses/LICENSE-2.0 |
(...skipping 2518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2529 payload = {} # payload for final request | 2529 payload = {} # payload for final request |
2530 if options.send_mail: | 2530 if options.send_mail: |
2531 payload["send_mail"] = "yes" | 2531 payload["send_mail"] = "yes" |
2532 if options.send_patch: | 2532 if options.send_patch: |
2533 payload["attach_patch"] = "yes" | 2533 payload["attach_patch"] = "yes" |
2534 if options.issue and message: | 2534 if options.issue and message: |
2535 payload["message"] = message | 2535 payload["message"] = message |
2536 payload = urllib.urlencode(payload) | 2536 payload = urllib.urlencode(payload) |
2537 rpc_server.Send("/" + issue + "/upload_complete/" + (patchset or ""), | 2537 rpc_server.Send("/" + issue + "/upload_complete/" + (patchset or ""), |
2538 payload=payload) | 2538 payload=payload) |
| 2539 # TODO(tandrii): remove temp fix due to cert problem: crbug/537763 |
| 2540 if ("codereview.chromium.org" in response_body and |
| 2541 (response_body.startswith("Issue created.") or |
| 2542 response_body.startswith("Issue updated."))): |
| 2543 print |
| 2544 print "NOTE: Due to certificate problems, try equivalent URL:" |
| 2545 print "https://chromiumcodereview.appspot.com/%s" % issue |
| 2546 print |
2539 return issue, patchset | 2547 return issue, patchset |
2540 | 2548 |
2541 | 2549 |
2542 def main(): | 2550 def main(): |
2543 try: | 2551 try: |
2544 logging.basicConfig(format=("%(asctime).19s %(levelname)s %(filename)s:" | 2552 logging.basicConfig(format=("%(asctime).19s %(levelname)s %(filename)s:" |
2545 "%(lineno)s %(message)s ")) | 2553 "%(lineno)s %(message)s ")) |
2546 os.environ['LC_ALL'] = 'C' | 2554 os.environ['LC_ALL'] = 'C' |
2547 RealMain(sys.argv) | 2555 RealMain(sys.argv) |
2548 except KeyboardInterrupt: | 2556 except KeyboardInterrupt: |
2549 print | 2557 print |
2550 StatusUpdate("Interrupted.") | 2558 StatusUpdate("Interrupted.") |
2551 sys.exit(1) | 2559 sys.exit(1) |
2552 except auth.AuthenticationError as e: | 2560 except auth.AuthenticationError as e: |
2553 print >> sys.stderr, e | 2561 print >> sys.stderr, e |
2554 sys.exit(1) | 2562 sys.exit(1) |
2555 | 2563 |
2556 | 2564 |
2557 if __name__ == "__main__": | 2565 if __name__ == "__main__": |
2558 main() | 2566 main() |
OLD | NEW |