OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2009 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 """Client-side script to send a try job to the try server. It communicates to | 6 """Client-side script to send a try job to the try server. It communicates to |
7 the try server by either writting to a svn repository or by directly connecting | 7 the try server by either writting to a svn repository or by directly connecting |
8 to the server by HTTP. | 8 to the server by HTTP. |
9 """ | 9 """ |
10 | 10 |
11 import datetime | 11 import datetime |
12 import errno | 12 import errno |
13 import getpass | 13 import getpass |
14 import logging | 14 import logging |
15 import optparse | 15 import optparse |
16 import os | 16 import os |
17 import posixpath | 17 import posixpath |
18 import re | 18 import re |
19 import shutil | 19 import shutil |
20 import sys | 20 import sys |
21 import tempfile | 21 import tempfile |
22 import urllib | 22 import urllib |
23 | 23 |
24 try: | 24 try: |
25 import simplejson as json | 25 import simplejson as json # pylint: disable=F0401 |
26 except ImportError: | 26 except ImportError: |
27 try: | 27 try: |
28 import json | 28 import json |
29 except ImportError: | 29 except ImportError: |
30 json = None | 30 json = None |
31 | 31 |
32 try: | 32 try: |
33 import breakpad # pylint: disable=W0611 | 33 import breakpad # pylint: disable=W0611 |
34 except ImportError: | 34 except ImportError: |
35 pass | 35 pass |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 print >> sys.stderr, e | 769 print >> sys.stderr, e |
770 return 1 | 770 return 1 |
771 except gclient_utils.Error, e: | 771 except gclient_utils.Error, e: |
772 print >> sys.stderr, e | 772 print >> sys.stderr, e |
773 return 1 | 773 return 1 |
774 return 0 | 774 return 0 |
775 | 775 |
776 | 776 |
777 if __name__ == "__main__": | 777 if __name__ == "__main__": |
778 sys.exit(TryChange(None, [], False)) | 778 sys.exit(TryChange(None, [], False)) |
OLD | NEW |