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

Side by Side Diff: client/isolateserver.py

Issue 2953253003: Replace custom blob gRPC API with ByteStream (Closed)
Patch Set: Import ndb directly to test code Created 3 years, 5 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
« no previous file with comments | « client/isolate_storage.py ('k') | client/proto/build.sh » ('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/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 under the Apache License, Version 2.0 3 # Use of this source code is governed under the Apache License, Version 2.0
4 # that can be found in the LICENSE file. 4 # that can be found in the LICENSE file.
5 5
6 """Archives a set of files or directories to an Isolate Server.""" 6 """Archives a set of files or directories to an Isolate Server."""
7 7
8 __version__ = '0.8.0' 8 __version__ = '0.8.0'
9 9
10 import errno 10 import errno
(...skipping 1948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 parser, options, set_exception_handler, required): 1959 parser, options, set_exception_handler, required):
1960 """Processes the --isolate-server option. 1960 """Processes the --isolate-server option.
1961 1961
1962 Returns the identity as determined by the server. 1962 Returns the identity as determined by the server.
1963 """ 1963 """
1964 if not options.isolate_server: 1964 if not options.isolate_server:
1965 if required: 1965 if required:
1966 parser.error('--isolate-server is required.') 1966 parser.error('--isolate-server is required.')
1967 return 1967 return
1968 1968
1969 if 'ISOLATED_GRPC_PROXY' in os.environ:
1970 options.is_grpc = True
1971
1969 if options.is_grpc: 1972 if options.is_grpc:
1970 isolate_storage.set_storage_api_class(isolate_storage.IsolateServerGrpc) 1973 isolate_storage.set_storage_api_class(isolate_storage.IsolateServerGrpc)
1971 else: 1974 else:
1972 try: 1975 try:
1973 options.isolate_server = net.fix_url(options.isolate_server) 1976 options.isolate_server = net.fix_url(options.isolate_server)
1974 except ValueError as e: 1977 except ValueError as e:
1975 parser.error('--isolate-server %s' % e) 1978 parser.error('--isolate-server %s' % e)
1976 if set_exception_handler: 1979 if set_exception_handler:
1977 on_error.report_on_exception_exit(options.isolate_server) 1980 on_error.report_on_exception_exit(options.isolate_server)
1978 try: 1981 try:
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 return dispatcher.execute(OptionParserIsolateServer(), args) 2049 return dispatcher.execute(OptionParserIsolateServer(), args)
2047 2050
2048 2051
2049 if __name__ == '__main__': 2052 if __name__ == '__main__':
2050 subprocess42.inhibit_os_error_reporting() 2053 subprocess42.inhibit_os_error_reporting()
2051 fix_encoding.fix_encoding() 2054 fix_encoding.fix_encoding()
2052 tools.disable_buffering() 2055 tools.disable_buffering()
2053 colorama.init() 2056 colorama.init()
2054 file_path.enable_symlink() 2057 file_path.enable_symlink()
2055 sys.exit(main(sys.argv[1:])) 2058 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « client/isolate_storage.py ('k') | client/proto/build.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698