OLD | NEW |
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 """Front end tool to operate on .isolate files. | 6 """Front end tool to operate on .isolate files. |
7 | 7 |
8 This includes creating, merging or compiling them to generate a .isolated file. | 8 This includes creating, merging or compiling them to generate a .isolated file. |
9 | 9 |
10 See more information at | 10 See more information at |
(...skipping 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2442 # there. | 2442 # there. |
2443 options.outdir = os.path.normpath(os.path.join(cwd, options.outdir)) | 2443 options.outdir = os.path.normpath(os.path.join(cwd, options.outdir)) |
2444 | 2444 |
2445 return options, args | 2445 return options, args |
2446 | 2446 |
2447 | 2447 |
2448 def main(argv): | 2448 def main(argv): |
2449 dispatcher = subcommand.CommandDispatcher(__name__) | 2449 dispatcher = subcommand.CommandDispatcher(__name__) |
2450 try: | 2450 try: |
2451 return dispatcher.execute(OptionParserIsolate(version=__version__), argv) | 2451 return dispatcher.execute(OptionParserIsolate(version=__version__), argv) |
2452 except ( | 2452 except Exception as e: |
2453 ExecutionError, | 2453 tools.report_error(e) |
2454 isolateserver.ConfigError, | |
2455 isolateserver.MappingError) as e: | |
2456 sys.stderr.write('\nError: ') | |
2457 sys.stderr.write(str(e)) | |
2458 sys.stderr.write('\n') | |
2459 return 1 | 2454 return 1 |
2460 | 2455 |
2461 | 2456 |
2462 if __name__ == '__main__': | 2457 if __name__ == '__main__': |
2463 fix_encoding.fix_encoding() | 2458 fix_encoding.fix_encoding() |
2464 tools.disable_buffering() | 2459 tools.disable_buffering() |
2465 colorama.init() | 2460 colorama.init() |
2466 sys.exit(main(sys.argv[1:])) | 2461 sys.exit(main(sys.argv[1:])) |
OLD | NEW |