Fix Python indentation for async methods
authorMark Slee <mcslee@apache.org>
Fri, 27 Oct 2006 22:30:15 +0000 (22:30 +0000)
committerMark Slee <mcslee@apache.org>
Fri, 27 Oct 2006 22:30:15 +0000 (22:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664857 13f79535-47bb-0310-9956-ffa450edef68

compiler/cpp/src/generate/t_py_generator.cc

index 0b661d3..1fe2ffa 100644 (file)
@@ -505,10 +505,9 @@ void t_py_generator::generate_service_client(t_service* tservice) {
       f_service_ <<
         indent() << "args.write(self._oprot)" << endl <<
         indent() << "self._oprot.writeMessageEnd()" << endl <<
-        indent() << "self._oprot.otrans.flush()" << endl;
+        indent() << "self._oprot.otrans.flush()" << endl;  
 
     indent_down();
-      
 
     if (!(*f_iter)->is_async()) {
       std::string resultname = (*f_iter)->get_name() + "_result";
@@ -557,11 +556,11 @@ void t_py_generator::generate_service_client(t_service* tservice) {
         f_service_ <<
           indent() << "raise Exception(\"" << (*f_iter)->get_name() << " failed: unknown result\");" << endl;
       }     
-    }      
 
-    // Close function
-    indent_down();
-    f_service_ << endl;   
+      // Close function
+      indent_down();
+      f_service_ << endl;   
+    }      
   }
 
   indent_down();