You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2009/03/30 21:31:36 UTC

svn commit: r760118 - /incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc

Author: dreiss
Date: Mon Mar 30 19:31:36 2009
New Revision: 760118

URL: http://svn.apache.org/viewvc?rev=760118&view=rev
Log:
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.

Modified:
    incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc

Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc?rev=760118&r1=760117&r2=760118&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc (original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_py_generator.cc Mon Mar 30 19:31:36 2009
@@ -929,9 +929,11 @@
     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();
     }
   }