aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler
diff options
context:
space:
mode:
authorGravatar Nathaniel Manista <nathaniel@google.com>2017-09-13 20:13:32 +0000
committerGravatar Nathaniel Manista <nathaniel@google.com>2017-09-13 20:13:32 +0000
commitd01fd422ece32c875abc9ad3cd022b3727cce2f4 (patch)
treebe7656dbcca60f1343185c80d01f484d5d935b11 /src/compiler
parent41388890860f29cd6e147bde163f57322a408a2f (diff)
grpc_1_0 flag for gRPC Python Protoc Plug-In
We'll soon be flipping the default behavior of gRPC Python Protoc Plug-In to the later-than-gRPC-1.0 "code elements only in a separate _pb2_grpc.py file and no Beta-API-using generated code elements" behavior; this flag will be the supported (supported for a while, though not exactly sure how long) means of using the older "also put gRPC-using code elements in the generated _pb2.py file" behavior that has been in place since gRPC 1.0.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/python_generator.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc
index 31b177c28e..a60b528e3b 100644
--- a/src/compiler/python_generator.cc
+++ b/src/compiler/python_generator.cc
@@ -769,7 +769,7 @@ bool PythonGrpcGenerator::Generate(const FileDescriptor* file,
PrivateGenerator generator(config_, &pbfile);
if (parameter == "grpc_2_0") {
return GenerateGrpc(context, generator, pb2_grpc_file_name, true);
- } else if (parameter == "") {
+ } else if (parameter == "grpc_1_0" || parameter == "") {
return GenerateGrpc(context, generator, pb2_grpc_file_name, true) &&
GenerateGrpc(context, generator, pb2_file_name, false);
} else {