| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2010 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 """\ | 6 """\ |
| 7 Wrapper script around Rietveld's upload.py that simplifies working with groups | 7 Wrapper script around Rietveld's upload.py that simplifies working with groups |
| 8 of files. | 8 of files. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import getpass | 11 import getpass |
| 12 import optparse | 12 import optparse |
| 13 import os | 13 import os |
| 14 import random | 14 import random |
| 15 import re | 15 import re |
| 16 import string | 16 import string |
| 17 import subprocess | 17 import subprocess |
| 18 import sys | 18 import sys |
| 19 import tempfile | 19 import tempfile |
| 20 import time | 20 import time |
| 21 from third_party import upload | 21 from third_party import upload |
| 22 import urllib2 | 22 import urllib2 |
| 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 # Some versions of python2.5 have an incomplete json module. Check to make | 29 # Some versions of python2.5 have an incomplete json module. Check to make |
| 30 # sure loads exists. | 30 # sure loads exists. |
| 31 # pylint: disable=W0104 | 31 # pylint: disable=W0104 |
| 32 json.loads | 32 json.loads |
| 33 except (ImportError, AttributeError): | 33 except (ImportError, AttributeError): |
| 34 # Import the one included in depot_tools. | 34 # Import the one included in depot_tools. |
| 35 sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party')) | 35 sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party')) |
| 36 import simplejson as json | 36 import simplejson as json # pylint: disable=F0401 |
| 37 | 37 |
| 38 import breakpad # pylint: disable=W0611 | 38 import breakpad # pylint: disable=W0611 |
| 39 | 39 |
| 40 # gcl now depends on gclient. | 40 # gcl now depends on gclient. |
| 41 from scm import SVN | 41 from scm import SVN |
| 42 import gclient_utils | 42 import gclient_utils |
| 43 | 43 |
| 44 __version__ = '1.2' | 44 __version__ = '1.2' |
| 45 | 45 |
| 46 | 46 |
| (...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1393 if e.code != 500: | 1393 if e.code != 500: |
| 1394 raise | 1394 raise |
| 1395 print >> sys.stderr, ( | 1395 print >> sys.stderr, ( |
| 1396 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1396 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
| 1397 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) | 1397 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) |
| 1398 return 1 | 1398 return 1 |
| 1399 | 1399 |
| 1400 | 1400 |
| 1401 if __name__ == "__main__": | 1401 if __name__ == "__main__": |
| 1402 sys.exit(main(sys.argv[1:])) | 1402 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |