OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # Copyright (C) 2008 Evan Martin <martine@danga.com> | 6 # Copyright (C) 2008 Evan Martin <martine@danga.com> |
7 | 7 |
8 """A git-command for integrating reviews on Rietveld and Gerrit.""" | 8 """A git-command for integrating reviews on Rietveld and Gerrit.""" |
9 | 9 |
10 from distutils.version import LooseVersion | 10 from distutils.version import LooseVersion |
(...skipping 4309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4320 DieWithError( | 4320 DieWithError( |
4321 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 4321 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
4322 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 4322 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
4323 return 0 | 4323 return 0 |
4324 | 4324 |
4325 | 4325 |
4326 if __name__ == '__main__': | 4326 if __name__ == '__main__': |
4327 # These affect sys.stdout so do it outside of main() to simplify mocks in | 4327 # These affect sys.stdout so do it outside of main() to simplify mocks in |
4328 # unit testing. | 4328 # unit testing. |
4329 fix_encoding.fix_encoding() | 4329 fix_encoding.fix_encoding() |
4330 colorama.init() | 4330 colorama.init(wrap="TERM" not in os.environ) |
4331 try: | 4331 try: |
4332 sys.exit(main(sys.argv[1:])) | 4332 sys.exit(main(sys.argv[1:])) |
4333 except KeyboardInterrupt: | 4333 except KeyboardInterrupt: |
4334 sys.stderr.write('interrupted\n') | 4334 sys.stderr.write('interrupted\n') |
4335 sys.exit(1) | 4335 sys.exit(1) |
OLD | NEW |