Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

THRIFT-5720: Encode binary args in Python remote #2826

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion compiler/cpp/src/thrift/generate/t_py_generator.cc
Expand Up @@ -1799,7 +1799,9 @@ void t_py_generator::generate_service_remote(t_service* tservice) {
first_arg = false;
else
f_remote << " ";
if (args[i]->get_type()->is_string()) {
if (args[i]->get_type()->is_binary()) {
f_remote << "args[" << i << "].encode('utf-8'),";
} else if (args[i]->get_type()->is_string()) {
f_remote << "args[" << i << "],";
} else {
f_remote << "eval(args[" << i << "]),";
Expand Down