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

Side by Side Diff: download_from_google_storage.py

Issue 1223793008: Default download_from_google_storage.py to verbose (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Rebase Created 5 years, 2 months 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 | no next file » | 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/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 """Download files from Google Storage based on SHA1 sums.""" 6 """Download files from Google Storage based on SHA1 sums."""
7 7
8 8
9 import hashlib 9 import hashlib
10 import optparse 10 import optparse
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 '(linux|mac|win). If so, the script will only ' 408 '(linux|mac|win). If so, the script will only '
409 'process files that are in the paths that ' 409 'process files that are in the paths that '
410 'that matches the current platform.') 410 'that matches the current platform.')
411 parser.add_option('-u', '--extract', 411 parser.add_option('-u', '--extract',
412 action='store_true', 412 action='store_true',
413 help='Extract a downloaded tar.gz file. ' 413 help='Extract a downloaded tar.gz file. '
414 'Leaves the tar.gz file around for sha1 verification' 414 'Leaves the tar.gz file around for sha1 verification'
415 'If a directory with the same name as the tar.gz ' 415 'If a directory with the same name as the tar.gz '
416 'file already exists, is deleted (to get a ' 416 'file already exists, is deleted (to get a '
417 'clean state in case of update.)') 417 'clean state in case of update.)')
418 parser.add_option('-v', '--verbose', action='store_true', 418 parser.add_option('-v', '--verbose', action='store_true', default=True,
419 help='Output extra diagnostic and progress information.') 419 help='DEPRECATED: Defaults to True. Use --no-verbose '
420 'to suppress.')
421 parser.add_option('-q', '--quiet', action='store_false', dest='verbose',
422 help='Suppresses diagnostic and progress information.')
420 423
421 (options, args) = parser.parse_args() 424 (options, args) = parser.parse_args()
422 425
423 # Make sure we should run at all based on platform matching. 426 # Make sure we should run at all based on platform matching.
424 if options.platform: 427 if options.platform:
425 if options.auto_platform: 428 if options.auto_platform:
426 parser.error('--platform can not be specified with --auto_platform') 429 parser.error('--platform can not be specified with --auto_platform')
427 if not re.match(options.platform, GetNormalizedPlatform()): 430 if not re.match(options.platform, GetNormalizedPlatform()):
428 if options.verbose: 431 if options.verbose:
429 print('The current platform doesn\'t match "%s", skipping.' % 432 print('The current platform doesn\'t match "%s", skipping.' %
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 510
508 return download_from_google_storage( 511 return download_from_google_storage(
509 input_filename, base_url, gsutil, options.num_threads, options.directory, 512 input_filename, base_url, gsutil, options.num_threads, options.directory,
510 options.recursive, options.force, options.output, options.ignore_errors, 513 options.recursive, options.force, options.output, options.ignore_errors,
511 options.sha1_file, options.verbose, options.auto_platform, 514 options.sha1_file, options.verbose, options.auto_platform,
512 options.extract) 515 options.extract)
513 516
514 517
515 if __name__ == '__main__': 518 if __name__ == '__main__':
516 sys.exit(main(sys.argv)) 519 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698