| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """ | 5 """ |
| 6 From a system-installed copy of the toolchain, packages all the required bits | 6 From a system-installed copy of the toolchain, packages all the required bits |
| 7 into a .zip file. | 7 into a .zip file. |
| 8 | 8 |
| 9 It assumes default install locations for tools, in particular: | 9 It assumes default install locations for tools, in particular: |
| 10 - C:\Program Files (x86)\Microsoft Visual Studio 12.0\... | 10 - C:\Program Files (x86)\Microsoft Visual Studio 12.0\... |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 zf.write(disk_name, archive_name) | 310 zf.write(disk_name, archive_name) |
| 311 else: | 311 else: |
| 312 missing_files = True | 312 missing_files = True |
| 313 sys.stdout.write('\r%s does not exist.\n\n' % disk_name) | 313 sys.stdout.write('\r%s does not exist.\n\n' % disk_name) |
| 314 sys.stdout.flush() | 314 sys.stdout.flush() |
| 315 if options.dryrun: | 315 if options.dryrun: |
| 316 sys.stdout.write('\r%1.3f GB of data in %d files, %d files for %s.%s\n' % | 316 sys.stdout.write('\r%1.3f GB of data in %d files, %d files for %s.%s\n' % |
| 317 (total_size / 1e9, count, version_match_count, WIN_VERSION, ' '*50)) | 317 (total_size / 1e9, count, version_match_count, WIN_VERSION, ' '*50)) |
| 318 return 0 | 318 return 0 |
| 319 if missing_files: | 319 if missing_files: |
| 320 raise 'One or more files were missing - aborting' | 320 raise Exception('One or more files were missing - aborting') |
| 321 if version_match_count == 0: | 321 if version_match_count == 0: |
| 322 raise 'No files found that match the specified winversion' | 322 raise Exception('No files found that match the specified winversion') |
| 323 sys.stdout.write('\rWrote to %s.%s\n' % (output, ' '*50)) | 323 sys.stdout.write('\rWrote to %s.%s\n' % (output, ' '*50)) |
| 324 sys.stdout.flush() | 324 sys.stdout.flush() |
| 325 | 325 |
| 326 RenameToSha1(output) | 326 RenameToSha1(output) |
| 327 | 327 |
| 328 return 0 | 328 return 0 |
| 329 | 329 |
| 330 | 330 |
| 331 if __name__ == '__main__': | 331 if __name__ == '__main__': |
| 332 sys.exit(main()) | 332 sys.exit(main()) |
| OLD | NEW |