diff options
author | Noah Eisen <ncteisen@gmail.com> | 2017-12-12 17:19:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-12 17:19:18 -0800 |
commit | 438f219701a0d4e41060142a5a5db0d828eeeb3f (patch) | |
tree | f3d876edec2c08a53f242143763bc39ab72ca3a2 /tools/distrib/python/grpcio_tools/grpc_tools/protoc.py | |
parent | 69e8ab400dadb2843e9a1927cf579bdec94d729b (diff) | |
parent | c47c58971bfd838843befed66430e87b77eab4fb (diff) |
Merge pull request #13719 from ncteisen/yapf-tools
Yapf tools/
Diffstat (limited to 'tools/distrib/python/grpcio_tools/grpc_tools/protoc.py')
-rw-r--r-- | tools/distrib/python/grpcio_tools/grpc_tools/protoc.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py b/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py index efad51e07b..582cba0e39 100644 --- a/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py +++ b/tools/distrib/python/grpcio_tools/grpc_tools/protoc.py @@ -19,16 +19,18 @@ import sys from grpc_tools import _protoc_compiler + def main(command_arguments): - """Run the protocol buffer compiler with the given command-line arguments. + """Run the protocol buffer compiler with the given command-line arguments. Args: command_arguments: a list of strings representing command line arguments to `protoc`. """ - command_arguments = [argument.encode() for argument in command_arguments] - return _protoc_compiler.run_main(command_arguments) + command_arguments = [argument.encode() for argument in command_arguments] + return _protoc_compiler.run_main(command_arguments) + if __name__ == '__main__': - proto_include = pkg_resources.resource_filename('grpc_tools', '_proto') - sys.exit(main(sys.argv + ['-I{}'.format(proto_include)])) + proto_include = pkg_resources.resource_filename('grpc_tools', '_proto') + sys.exit(main(sys.argv + ['-I{}'.format(proto_include)])) |