You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by hc...@apache.org on 2014/09/29 23:38:31 UTC
git commit: THRIFT-2664: py - fixed errors on calling oneway functions
Repository: thrift
Updated Branches:
refs/heads/master 03394b54f -> 485d71acd
THRIFT-2664: py - fixed errors on calling oneway functions
Client: Python-Compiler
Patch: Dustin Spicuzza
'recv_' method is resolved later, thus disregarding exceptions send from
oneway methods calls
This closes #188
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/485d71ac
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/485d71ac
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/485d71ac
Branch: refs/heads/master
Commit: 485d71acd10b543890ea3114fda5be8cb88a2f0e
Parents: 03394b5
Author: Konrad Grochowski <hc...@apache.org>
Authored: Tue Aug 12 17:24:20 2014 -0400
Committer: Konrad Grochowski <hc...@apache.org>
Committed: Mon Sep 29 23:38:15 2014 +0200
----------------------------------------------------------------------
compiler/cpp/src/generate/t_py_generator.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/485d71ac/compiler/cpp/src/generate/t_py_generator.cc
----------------------------------------------------------------------
diff --git a/compiler/cpp/src/generate/t_py_generator.cc b/compiler/cpp/src/generate/t_py_generator.cc
index e6d7bdd..924bcc7 100644
--- a/compiler/cpp/src/generate/t_py_generator.cc
+++ b/compiler/cpp/src/generate/t_py_generator.cc
@@ -1259,11 +1259,11 @@ void t_py_generator::generate_service_client(t_service* tservice) {
indent() << " tr = TTransport.TMemoryBuffer(frame)" << endl <<
indent() << " iprot = self._iprot_factory.getProtocol(tr)" << endl <<
indent() << " (fname, mtype, rseqid) = iprot.readMessageBegin()" << endl <<
- indent() << " method = getattr(self, 'recv_' + fname)" << endl <<
indent() << " future = self._reqs.pop(rseqid, None)" << endl <<
indent() << " if not future:" << endl <<
indent() << " # future has already been discarded" << endl <<
indent() << " continue" << endl <<
+ indent() << " method = getattr(self, 'recv_' + fname)" << endl <<
indent() << " try:" << endl <<
indent() << " result = method(iprot, mtype, rseqid)" << endl <<
indent() << " except Exception as e:" << endl <<