From 0579dcaed6fbfa88765e5640c9262dd3bcc8801d Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Wed, 16 Jan 2019 10:26:59 -0800 Subject: [PATCH] Escalate the failure of protoc execution --- tools/distrib/python/grpcio_tools/grpc_tools/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/distrib/python/grpcio_tools/grpc_tools/command.py b/tools/distrib/python/grpcio_tools/grpc_tools/command.py index 7ede05f1404..93503c4cc36 100644 --- a/tools/distrib/python/grpcio_tools/grpc_tools/command.py +++ b/tools/distrib/python/grpcio_tools/grpc_tools/command.py @@ -42,7 +42,7 @@ def build_package_protos(package_root): '--grpc_python_out={}'.format(inclusion_root), ] + [proto_file] if protoc.main(command) != 0: - sys.stderr.write('warning: {} failed'.format(command)) + raise RuntimeError('error: {} failed'.format(command)) class BuildPackageProtos(setuptools.Command):