Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(892)

Side by Side Diff: gcl.py

Issue 5110009: Add an alert for python < 2.5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | gclient.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1344 print sys.modules[__name__].__doc__ 1344 print sys.modules[__name__].__doc__
1345 print 'version ' + __version__ + '\n' 1345 print 'version ' + __version__ + '\n'
1346 1346
1347 print('Commands are:\n' + '\n'.join([ 1347 print('Commands are:\n' + '\n'.join([
1348 ' %-12s %s' % (fn[3:], Command(fn[3:]).__doc__.split('\n')[0].strip()) 1348 ' %-12s %s' % (fn[3:], Command(fn[3:]).__doc__.split('\n')[0].strip())
1349 for fn in dir(sys.modules[__name__]) if fn.startswith('CMD')])) 1349 for fn in dir(sys.modules[__name__]) if fn.startswith('CMD')]))
1350 return 0 1350 return 0
1351 1351
1352 1352
1353 def main(argv): 1353 def main(argv):
1354 if sys.hexversion < 0x02050000:
1355 print >> sys.stderr, (
1356 '\nYour python version is unsupported, please upgrade.\n')
1354 if not argv: 1357 if not argv:
1355 argv = ['help'] 1358 argv = ['help']
1356 command = Command(argv[0]) 1359 command = Command(argv[0])
1357 # Help can be run from anywhere. 1360 # Help can be run from anywhere.
1358 if command == CMDhelp: 1361 if command == CMDhelp:
1359 return command(argv[1:]) 1362 return command(argv[1:])
1360 1363
1361 try: 1364 try:
1362 GetRepositoryRoot() 1365 GetRepositoryRoot()
1363 except gclient_utils.Error: 1366 except gclient_utils.Error:
(...skipping 25 matching lines...) Expand all
1389 if e.code != 500: 1392 if e.code != 500:
1390 raise 1393 raise
1391 print >> sys.stderr, ( 1394 print >> sys.stderr, (
1392 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 1395 'AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
1393 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)) 1396 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))
1394 return 1 1397 return 1
1395 1398
1396 1399
1397 if __name__ == "__main__": 1400 if __name__ == "__main__":
1398 sys.exit(main(sys.argv[1:])) 1401 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | gclient.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698