From 64f87529db1be48cc23eb454683b10d240f81557 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Mon, 30 Mar 2009 19:31:36 +0000 Subject: [PATCH] THRIFT-412. python: Fix some syntacticaly-incorrect code generation r758558 introduced a but that caused some of the generated docstrings to be indented incorrectly, resulting in syntactically invalid code. This commit fixes the indentation. git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760118 13f79535-47bb-0310-9956-ffa450edef68 --- compiler/cpp/src/generate/t_py_generator.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/cpp/src/generate/t_py_generator.cc b/compiler/cpp/src/generate/t_py_generator.cc index 59a4705c1..69c1996c0 100644 --- a/compiler/cpp/src/generate/t_py_generator.cc +++ b/compiler/cpp/src/generate/t_py_generator.cc @@ -929,9 +929,11 @@ void t_py_generator::generate_service_interface(t_service* tservice) { for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) { f_service_ << indent() << "def " << function_signature_if(*f_iter) << ":" << endl; + indent_up(); generate_python_docstring(f_service_, (*f_iter)); f_service_ << - indent() << " pass" << endl << endl; + indent() << "pass" << endl << endl; + indent_down(); } }