| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 """Access the commit queue from the command line. | 6 """Access the commit queue from the command line. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 __version__ = '0.1' | 9 __version__ = '0.1' |
| 10 | 10 |
| 11 import functools | 11 import functools |
| 12 import json | 12 import json |
| 13 import logging | 13 import logging |
| 14 import optparse | 14 import optparse |
| 15 import os | 15 import os |
| 16 import sys | 16 import sys |
| 17 import urllib2 | 17 import urllib2 |
| 18 | 18 |
| 19 import breakpad # pylint: disable=W0611 | 19 import breakpad # pylint: disable=W0611 |
| 20 | 20 |
| 21 import auth | 21 import auth |
| 22 import fix_encoding | 22 import fix_encoding |
| 23 import rietveld | 23 import rietveld |
| 24 | 24 |
| 25 THIRD_PARTY_DIR = os.path.join(os.path.dirname(__file__), 'third_party') | 25 THIRD_PARTY_DIR = os.path.join(os.path.dirname(__file__), 'third_party') |
| 26 sys.path.append(THIRD_PARTY_DIR) | 26 sys.path.insert(0, THIRD_PARTY_DIR) |
| 27 | 27 |
| 28 from cq_client import cq_pb2 | 28 from cq_client import cq_pb2 |
| 29 from google.protobuf import text_format | 29 from google.protobuf import text_format |
| 30 | 30 |
| 31 def usage(more): | 31 def usage(more): |
| 32 def hook(fn): | 32 def hook(fn): |
| 33 fn.func_usage_more = more | 33 fn.func_usage_more = more |
| 34 return fn | 34 return fn |
| 35 return hook | 35 return hook |
| 36 | 36 |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 return CMDhelp(parser, args) | 228 return CMDhelp(parser, args) |
| 229 | 229 |
| 230 | 230 |
| 231 if __name__ == "__main__": | 231 if __name__ == "__main__": |
| 232 fix_encoding.fix_encoding() | 232 fix_encoding.fix_encoding() |
| 233 try: | 233 try: |
| 234 sys.exit(main()) | 234 sys.exit(main()) |
| 235 except KeyboardInterrupt: | 235 except KeyboardInterrupt: |
| 236 sys.stderr.write('interrupted\n') | 236 sys.stderr.write('interrupted\n') |
| 237 sys.exit(1) | 237 sys.exit(1) |
| OLD | NEW |