Skip to content
Snippets Groups Projects
Commit ea3a1255 authored by Ken Payson's avatar Ken Payson
Browse files

Fix python compiler for filenames with dashes

parent 01b536c3
No related branches found
No related tags found
No related merge requests found
...@@ -771,6 +771,7 @@ bool PythonGrpcGenerator::Generate(const FileDescriptor* file, ...@@ -771,6 +771,7 @@ bool PythonGrpcGenerator::Generate(const FileDescriptor* file,
file->name().find_last_of(".proto") == file->name().size() - 1) { file->name().find_last_of(".proto") == file->name().size() - 1) {
grpc::string base = grpc::string base =
file->name().substr(0, file->name().size() - proto_suffix_length); file->name().substr(0, file->name().size() - proto_suffix_length);
std::replace(base.begin(), base.end(), '-', '_');
pb2_file_name = base + "_pb2.py"; pb2_file_name = base + "_pb2.py";
pb2_grpc_file_name = base + "_pb2_grpc.py"; pb2_grpc_file_name = base + "_pb2_grpc.py";
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment