| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 The LUCI Authors. All rights reserved. | 2 # Copyright 2013 The LUCI Authors. All rights reserved. |
| 3 # Use of this source code is governed by the Apache v2.0 license that can be | 3 # Use of this source code is governed by the Apache v2.0 license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Client tool to trigger tasks or retrieve results from a Swarming server.""" | 6 """Client tool to trigger tasks or retrieve results from a Swarming server.""" |
| 7 | 7 |
| 8 __version__ = '0.8.5' | 8 __version__ = '0.8.5' |
| 9 | 9 |
| 10 import collections | 10 import collections |
| (...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 | 917 |
| 918 command = args | 918 command = args |
| 919 if not options.task_name: | 919 if not options.task_name: |
| 920 options.task_name = u'%s/%s' % ( | 920 options.task_name = u'%s/%s' % ( |
| 921 options.user, | 921 options.user, |
| 922 '_'.join( | 922 '_'.join( |
| 923 '%s=%s' % (k, v) | 923 '%s=%s' % (k, v) |
| 924 for k, v in sorted(options.dimensions.iteritems()))) | 924 for k, v in sorted(options.dimensions.iteritems()))) |
| 925 inputs_ref = None | 925 inputs_ref = None |
| 926 else: | 926 else: |
| 927 isolateserver.process_isolate_server_options(parser, options, False) | 927 isolateserver.process_isolate_server_options(parser, options, False, True) |
| 928 try: | 928 try: |
| 929 command, inputs_ref = isolated_handle_options(options, args) | 929 command, inputs_ref = isolated_handle_options(options, args) |
| 930 except ValueError as e: | 930 except ValueError as e: |
| 931 parser.error(str(e)) | 931 parser.error(str(e)) |
| 932 | 932 |
| 933 # If inputs_ref is used, command is actually extra_args. Otherwise it's an | 933 # If inputs_ref is used, command is actually extra_args. Otherwise it's an |
| 934 # actual command to run. | 934 # actual command to run. |
| 935 properties = TaskProperties( | 935 properties = TaskProperties( |
| 936 command=None if inputs_ref else command, | 936 command=None if inputs_ref else command, |
| 937 dimensions=options.dimensions, | 937 dimensions=options.dimensions, |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1524 def main(args): | 1524 def main(args): |
| 1525 dispatcher = subcommand.CommandDispatcher(__name__) | 1525 dispatcher = subcommand.CommandDispatcher(__name__) |
| 1526 return dispatcher.execute(OptionParserSwarming(version=__version__), args) | 1526 return dispatcher.execute(OptionParserSwarming(version=__version__), args) |
| 1527 | 1527 |
| 1528 | 1528 |
| 1529 if __name__ == '__main__': | 1529 if __name__ == '__main__': |
| 1530 fix_encoding.fix_encoding() | 1530 fix_encoding.fix_encoding() |
| 1531 tools.disable_buffering() | 1531 tools.disable_buffering() |
| 1532 colorama.init() | 1532 colorama.init() |
| 1533 sys.exit(main(sys.argv[1:])) | 1533 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |